summaryrefslogtreecommitdiff
path: root/lib/libc/string/strstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/string/strstr.c')
-rw-r--r--lib/libc/string/strstr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libc/string/strstr.c b/lib/libc/string/strstr.c
index 890a4aba98f5..c17ed8208f18 100644
--- a/lib/libc/string/strstr.c
+++ b/lib/libc/string/strstr.c
@@ -143,9 +143,8 @@ static char *twoway_strstr(const unsigned char *h, const unsigned char *n)
/* Check last byte first; advance by shift on mismatch */
if (BITOP(byteset, h[l-1], &)) {
k = l-shift[h[l-1]];
- //printf("adv by %zu (on %c) at [%s] (%zu;l=%zu)\n", k, h[l-1], h, shift[h[l-1]], l);
if (k) {
- if (mem0 && mem && k < p) k = l-p;
+ if (k < mem) k = mem;
h += k;
mem = 0;
continue;