summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/memmem.3
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-02-23 06:28:41 -0300
committerRenato Botelho <renato@netgate.com>2017-02-23 06:28:41 -0300
commit82ceeb2ea625cd9bff60f2863b9a0830f55b7905 (patch)
tree263ca9347bf664a4489743f9302e699ce14de1df /lib/libc/string/memmem.3
parent4a05f5440acda223e6a0ec5157bc32ecc0f09ff9 (diff)
parentd20dd8b36e7a565be7bfbb22aade51c8ffd753e9 (diff)
downloadFreeBSD-src-82ceeb2ea625cd9bff60f2863b9a0830f55b7905.zip
FreeBSD-src-82ceeb2ea625cd9bff60f2863b9a0830f55b7905.tar.gz
Merge remote-tracking branch 'origin/stable/10' into develdevel
Diffstat (limited to 'lib/libc/string/memmem.3')
-rw-r--r--lib/libc/string/memmem.322
1 files changed, 14 insertions, 8 deletions
diff --git a/lib/libc/string/memmem.3 b/lib/libc/string/memmem.3
index 73c267c..fb341f4 100644
--- a/lib/libc/string/memmem.3
+++ b/lib/libc/string/memmem.3
@@ -26,7 +26,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 24, 2005
+.Dd May 26, 2015
.Dt MEMMEM 3
.Os
.Sh NAME
@@ -51,14 +51,12 @@ in the byte string
.Fa big .
.Sh RETURN VALUES
If
-.Fa big_len
-is smaller than
-.Fa little_len ,
-if
.Fa little_len
-is 0, if
-.Fa big_len
-is 0 or if
+is zero
+.Fa big
+is returned (that is, an empty little is deemed to match at the beginning of
+big);
+if
.Fa little
occurs nowhere in
.Fa big ,
@@ -84,3 +82,11 @@ function first appeared in
.Sh BUGS
This function was broken in Linux libc up to and including version 5.0.9
and in GNU libc prior to version 2.1.
+Prior to
+.Fx 11.0
+.Nm
+returned
+.Dv NULL
+when
+.Fa little_len
+equals 0.
OpenPOWER on IntegriCloud