mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
Skip strcmp() on 2 NULL pointers.
Andrew Bartlett
This commit is contained in:
parent
85c9b21a45
commit
7b9a647ebb
@ -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; \
|
||||
|
Loading…
x
Reference in New Issue
Block a user