fix spuriously slow check in twoway strstr/memmem cores

mem0 && mem && ... is redundant since mem can only be nonzero when
mem0 is nonzero.
This commit is contained in:
Rich Felker committed 2018-11-02 12:02:09 -04:00
1 parent 1b52863e24
commit 8f5a820d14
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -100,7 +100,7 @@ static char *twoway_memmem(const unsigned char *h, const unsigned char *z, const
if (BITOP(byteset, h[l-1], &)) {
k = l-shift[h[l-1]];
if (k) {
if (mem0 && mem && k < p) k = l-p;
if (mem && k < p) k = l-p;
h += k;
mem = 0;
continue;