summaryrefslogtreecommitdiffstats
path: root/test/unit/ph.c
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2016-04-05 23:32:32 (GMT)
committerJason Evans <jasone@canonware.com>2016-04-05 23:32:59 (GMT)
commita3c4193280b2fbd267b68f3bce091a53b5ea0b97 (patch)
tree3cf18d6669086cbd2f4fccb29bcc1e6b07bb929a /test/unit/ph.c
parentb582d2ad9418630d65540ce8dfa9f96e69eb4df9 (diff)
downloadjemalloc-a3c4193280b2fbd267b68f3bce091a53b5ea0b97.zip
jemalloc-a3c4193280b2fbd267b68f3bce091a53b5ea0b97.tar.gz
jemalloc-a3c4193280b2fbd267b68f3bce091a53b5ea0b97.tar.bz2
Fix a compilation warning in the ph test code.
Diffstat (limited to 'test/unit/ph.c')
-rw-r--r--test/unit/ph.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/test/unit/ph.c b/test/unit/ph.c
index b0e4402..103475b 100644
--- a/test/unit/ph.c
+++ b/test/unit/ph.c
@@ -19,32 +19,14 @@ TEST_END
TEST_BEGIN(test_ph_random)
{
#define NNODES 25
-#define NBAGS 250
#define SEED 42
sfmt_t *sfmt;
- uint64_t bag[NNODES];
ph_heap_t heap;
node_t nodes[NNODES];
unsigned i, j, k;
sfmt = init_gen_rand(SEED);
- for (i = 0; i < NBAGS; i++) {
- switch (i) {
- case 0:
- /* Insert in order. */
- for (j = 0; j < NNODES; j++)
- bag[j] = j;
- break;
- case 1:
- /* Insert in reverse order. */
- for (j = 0; j < NNODES; j++)
- bag[j] = NNODES - j - 1;
- break;
- default:
- for (j = 0; j < NNODES; j++)
- bag[j] = gen_rand64_range(sfmt, NNODES);
- }
-
+ for (i = 0; i < 2; i++) {
for (j = 1; j <= NNODES; j++) {
/* Initialize heap and nodes. */
ph_new(&heap);
@@ -77,7 +59,6 @@ TEST_BEGIN(test_ph_random)
}
fini_gen_rand(sfmt);
#undef NNODES
-#undef NBAGS
#undef SEED
}
TEST_END