summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-04-17 11:22:23 +0200
committerAndrew Bartlett <abartlet@samba.org>2008-04-17 11:22:23 +0200
commit0236a50c114bdd53527b7dc0acd81925607621c2 (patch)
treed5735506fd1fa73fc69c784d08cf0bb543f95a47 /source4
parente1b3c0fa8994612cfd34801c5ba0e5b0032137d2 (diff)
downloadsamba-0236a50c114bdd53527b7dc0acd81925607621c2.tar.gz
samba-0236a50c114bdd53527b7dc0acd81925607621c2.tar.bz2
samba-0236a50c114bdd53527b7dc0acd81925607621c2.zip
Skip strcmp() on 2 NULL pointers.
Andrew Bartlett (This used to be commit 7b9a647ebbbe9ec9e1b82b42e3a8916396f91273)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/talloc/testsuite.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/lib/talloc/testsuite.c b/source4/lib/talloc/testsuite.c
index fedbda95aa..3f06eee566 100644
--- a/source4/lib/talloc/testsuite.c
+++ b/source4/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; \