Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Jan 2022 16:54:19 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: c6750f07b43d - main - libc: fix misleading comment in strstr
Message-ID:  <202201161654.20GGsJ3n033680@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=c6750f07b43d18d39729570533f4ecb56da286bf

commit c6750f07b43d18d39729570533f4ecb56da286bf
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2022-01-16 16:50:10 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2022-01-16 16:52:29 +0000

    libc: fix misleading comment in strstr
    
    Obtained from:  musl c53e9b239418
---
 lib/libc/string/strstr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libc/string/strstr.c b/lib/libc/string/strstr.c
index 72f8abb9e200..ce06db11f161 100644
--- a/lib/libc/string/strstr.c
+++ b/lib/libc/string/strstr.c
@@ -149,7 +149,7 @@ twoway_strstr(const unsigned char *h, const unsigned char *n)
 	for (;;) {
 		/* Update incremental end-of-haystack pointer */
 		if (z - h < l) {
-			/* Fast estimate for MIN(l,63) */
+			/* Fast estimate for MAX(l,63) */
 			size_t grow = l | 63;
 			const unsigned char *z2 = memchr(z, 0, grow);
 			if (z2) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202201161654.20GGsJ3n033680>