The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=823b81ac9c75f4c86b8e85e12bf1f0219ae59608
commit 823b81ac9c75f4c86b8e85e12bf1f0219ae59608 Author: Konstantin Belousov <k...@freebsd.org> AuthorDate: 2025-07-19 12:15:44 +0000 Commit: Konstantin Belousov <k...@freebsd.org> CommitDate: 2025-07-25 03:23:49 +0000 memchr.3: mention the len argument in the functions description (cherry picked from commit 441995e161a2564d37947d054a2f1219754deb5f) --- lib/libc/string/memchr.3 | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/libc/string/memchr.3 b/lib/libc/string/memchr.3 index 72a4fa70e536..52343c23f9db 100644 --- a/lib/libc/string/memchr.3 +++ b/lib/libc/string/memchr.3 @@ -54,7 +54,10 @@ locates the first occurrence of (converted to an .Vt "unsigned char" ) in string -.Fa b . +.Fa b , +limited to at most +.Fa len +characters. .Pp The .Fn memrchr @@ -63,15 +66,18 @@ function behaves like except that it locates the last occurrence of .Fa c in string -.Fa b . +.Fa b , +limited to the first +.Fa len +characters. .Sh RETURN VALUES The .Fn memchr and .Fn memrchr -functions -return a pointer to the byte located, -or NULL if no such byte exists within +functions return a pointer to the byte located, or +.Dv NULL +if no such byte exists within .Fa len bytes. .Sh SEE ALSO