[glib/wip/pwithnall/restore-macos-ci: 96/98] tests: Remove unused function from slice-memchunk.c
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/pwithnall/restore-macos-ci: 96/98] tests: Remove unused function from slice-memchunk.c
- Date: Tue, 7 Jun 2022 17:27:26 +0000 (UTC)
commit 6a1e35422fb75e2a6c6a0b33f0be8c8448726222
Author: Philip Withnall <pwithnall endlessos org>
Date: Fri May 27 15:30:44 2022 +0100
tests: Remove unused function from slice-memchunk.c
Signed-off-by: Philip Withnall <pwithnall endlessos org>
glib/tests/slice-memchunk.c | 13 -------------
1 file changed, 13 deletions(-)
---
diff --git a/glib/tests/slice-memchunk.c b/glib/tests/slice-memchunk.c
index ea8bee0c06..9db5eae657 100644
--- a/glib/tests/slice-memchunk.c
+++ b/glib/tests/slice-memchunk.c
@@ -29,7 +29,6 @@ static const guint prime_size = 1021; /* 769; 509 */
static const gboolean clean_memchunks = FALSE;
static const guint number_of_blocks = 10000; /* total number of blocks allocated */
static const guint number_of_repetitions = 10000; /* number of alloc+free repetitions */
-static const gboolean want_corruption = FALSE;
/* --- old memchunk prototypes (memchunks.c) --- */
GMemChunk* old_mem_chunk_new (const gchar *name,
@@ -51,18 +50,6 @@ void old_mem_chunk_info (void);
#endif
/* --- functions --- */
-static inline int
-corruption (void)
-{
- if (G_UNLIKELY (want_corruption))
- {
- /* corruption per call likelyness is about 1:4000000 */
- guint32 r = g_random_int() % 8000009;
- return r == 277 ? +1 : r == 281 ? -1 : 0;
- }
- return 0;
-}
-
static inline gpointer
memchunk_alloc (GMemChunk **memchunkp,
guint size)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]