]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r283584:
authorngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 9 Feb 2017 21:23:41 +0000 (21:23 +0000)
committerngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 9 Feb 2017 21:23:41 +0000 (21:23 +0000)
commit338b7c554315241ebbf72c6668f1c5087c722ca8
tree5fcacd65a72553a84e74f0eb00694a68c884e8d6
parent7f45ae4a6190cfc2c0ee92e565c45dc4b9f784e1
MFC r283584:

Relnotes: yes

r283584 (by emaste):

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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@313480 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
contrib/netbsd-tests/lib/libc/string/t_memmem.c
lib/libc/string/memmem.3
lib/libc/string/memmem.c