summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-04-17 11:22:23 +0200
committerStefan Metzmacher <metze@samba.org>2008-09-14 19:17:19 +0200
commitafbd57080b03e01f31c3a873769b097bd876928f (patch)
treeacae7ab0651ac2270962d63c47064a58d5e29250 /source3
parentb725e9e586a075636fc96212d4c8528c9072e6d6 (diff)
downloadsamba-afbd57080b03e01f31c3a873769b097bd876928f.tar.gz
samba-afbd57080b03e01f31c3a873769b097bd876928f.tar.bz2
samba-afbd57080b03e01f31c3a873769b097bd876928f.zip
Skip strcmp() on 2 NULL pointers.
Andrew Bartlett (cherry picked from commit 7b9a647ebbbe9ec9e1b82b42e3a8916396f91273) (This used to be commit 60f7bdac64e32ea39099ababacca6f8a2b780ecb)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/talloc/testsuite.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/lib/talloc/testsuite.c b/source3/lib/talloc/testsuite.c
index fedbda95aa..3f06eee566 100644
--- a/source3/lib/talloc/testsuite.c
+++ b/source3/lib/talloc/testsuite.c
@@ -48,7 +48,8 @@ static double timeval_elapsed(struct timeval *tv)
}
#define torture_assert_str_equal(test, arg1, arg2, desc) \
- if (strcmp(arg1, arg2)) { \
+ if (arg1 == NULL && arg2 == NULL) { \
+ } else if (strcmp(arg1, arg2)) { \
printf("failure: %s [\n%s: Expected %s, got %s: %s\n]\n", \
test, __location__, arg1, arg2, desc); \
return false; \