diff options
Diffstat (limited to 'lib/replace/test')
-rw-r--r-- | lib/replace/test/testsuite.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/replace/test/testsuite.c b/lib/replace/test/testsuite.c index 829e9f9c1d..46697b5f19 100644 --- a/lib/replace/test/testsuite.c +++ b/lib/replace/test/testsuite.c @@ -1027,7 +1027,9 @@ static int test_memmem(void) } s = memmem("foo", 3, "", 0); - if (strcmp(s, "foo") != 0) { + /* it is allowable for this to return NULL (as happens on + FreeBSD) */ + if (s && strcmp(s, "foo") != 0) { printf(__location__ ": Failed memmem\n"); return false; } |