diff options
Diffstat (limited to 'lib/talloc/testsuite.c')
-rw-r--r-- | lib/talloc/testsuite.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/talloc/testsuite.c b/lib/talloc/testsuite.c index 35309e2af25..a76a64716c8 100644 --- a/lib/talloc/testsuite.c +++ b/lib/talloc/testsuite.c @@ -63,7 +63,9 @@ static double private_timeval_elapsed(struct timeval *tv) } #define torture_assert_str_equal(test, arg1, arg2, desc) \ - if (arg1 == NULL && arg2 == NULL) { \ + if (arg1 == NULL && arg2 == NULL) { /* OK, both NULL == equal */ \ + } else if (arg1 == NULL || arg2 == NULL) { \ + return false; \ } else if (strcmp(arg1, arg2)) { \ printf("failure: %s [\n%s: Expected %s, got %s: %s\n]\n", \ test, __location__, arg1, arg2, desc); \ |