projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
remove duplicate definitions of INET[6]_ADDRSTRLEN
[musl]
/
src
/
string
/
strstr.c
diff --git
a/src/string/strstr.c
b/src/string/strstr.c
index
c7d6668
..
55ba1c7
100644
(file)
--- a/
src/string/strstr.c
+++ b/
src/string/strstr.c
@@
-109,7
+109,7
@@
static char *twoway_strstr(const unsigned char *h, const unsigned char *n)
if (BITOP(byteset, h[l-1], &)) {
k = l-shift[h[l-1]];
if (k) {
- if (
mem && k < p) k = l-p
;
+ if (
k < mem) k = mem
;
h += k;
mem = 0;
continue;