string: correct documentation for strstr and strnstr

The len parameter for strnstr() concerns the maximum size of the
haystack to consider, not the length of the needle being searched for.

strstr() obviously has no len parameter, so remove the copy-pasta.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
This commit is contained in:
Rasmus Villemoes
2026-07-21 13:51:06 -06:00
committed by Tom Rini
parent 210fedfcfc
commit 6b58f877bd
+1 -2
View File
@@ -702,7 +702,7 @@ void *memdup(const void *src, size_t len)
*
* @s1: string to be searched
* @s2: string to search for
* @len: maximum number of characters in s2 to consider
* @len: maximum number of characters in s1 to consider
*
* Return: pointer to the first occurrence or NULL
*/
@@ -728,7 +728,6 @@ char *strnstr(const char *s1, const char *s2, size_t len)
*
* @s1: string to be searched
* @s2: string to search for
* @len: maximum number of characters in s2 to consider
*
* Return: pointer to the first occurrence or NULL
*/