improve ioctl time64 conversion fallback framework
[musl] / src / string / strstr.c
index c80e9ca..55ba1c7 100644 (file)
@@ -108,9 +108,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 (mem && k < p) k = l-p;
+                               if (k < mem) k = mem;
                                h += k;
                                mem = 0;
                                continue;