From d45a21328b20ce30a629a8ae4a01e8e3434e7000 Mon Sep 17 00:00:00 2001 From: emaste Date: Tue, 26 May 2015 21:16:07 +0000 Subject: memmem(3): empty little string matches the beginning of the big string This function originated in glibc, and this matches their behaviour (and NetBSD, OpenBSD, and musl). An empty big string (arg "l") is handled by the existing l_len < s_len test. Reviewed by: bapt, ngie Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2657 --- contrib/netbsd-tests/lib/libc/string/t_memmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib/netbsd-tests/lib/libc') diff --git a/contrib/netbsd-tests/lib/libc/string/t_memmem.c b/contrib/netbsd-tests/lib/libc/string/t_memmem.c index 8734bc3..5807662 100644 --- a/contrib/netbsd-tests/lib/libc/string/t_memmem.c +++ b/contrib/netbsd-tests/lib/libc/string/t_memmem.c @@ -75,7 +75,7 @@ ATF_TC_HEAD(memmem_basic, tc) ATF_TC_BODY(memmem_basic, tc) { -#if defined(__darwin__) || defined(__FreeBSD__) +#if defined(__darwin__) expect(memmem(b2, lb2, p0, lp0) == NULL); expect(memmem(b0, lb0, p0, lp0) == NULL); #else -- cgit v1.1