diff options
Diffstat (limited to 'benchtests')
-rw-r--r-- | benchtests/bench-malloc-simple.c | 2 | ||||
-rw-r--r-- | benchtests/bench-strstr.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/benchtests/bench-malloc-simple.c b/benchtests/bench-malloc-simple.c index b8bb2cc116..c4f06f6999 100644 --- a/benchtests/bench-malloc-simple.c +++ b/benchtests/bench-malloc-simple.c @@ -87,7 +87,7 @@ bench (unsigned long size) size_t iters = NUM_ITERS; int **arr = (int**) malloc (MAX_ALLOCS * sizeof (void*)); - for (int t = 0; t <= 3; t++) + for (int t = 0; t < 3; t++) for (int i = 0; i < NUM_ALLOCS; i++) { tests[t][i].n = allocs[i]; diff --git a/benchtests/bench-strstr.c b/benchtests/bench-strstr.c index 2cbe13e9ac..89d1755813 100644 --- a/benchtests/bench-strstr.c +++ b/benchtests/bench-strstr.c @@ -147,7 +147,8 @@ do_one_test (impl_t *impl, const char *s1, const char *s2, char *exp_result) if (res != exp_result) { error (0, 0, "Wrong result in function %s %s %s", impl->name, - res, exp_result); + (res == NULL) ? "(null)" : res, + (exp_result == NULL) ? "(null)" : exp_result); ret = 1; } } |