summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2005-02-11 21:07:51 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2005-02-11 21:07:51 +0000
commit029f08c23c243660e5f61d813a657c7bf2499178 (patch)
tree1aa5eb32696721df33cf66a652d0bc8783a83d2b /lib/libc
parentf165cb7c5df0136d4bcd11d1eb66a777f7dbbf73 (diff)
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/string/strnstr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/string/strnstr.c b/lib/libc/string/strnstr.c
index 6983507b55db..749c43baca8a 100644
--- a/lib/libc/string/strnstr.c
+++ b/lib/libc/string/strnstr.c
@@ -60,7 +60,7 @@ strnstr(s, find, slen)
len = strlen(find);
do {
do {
- if ((sc = *s++) == '\0' || slen-- < 1)
+ if (slen-- < 1 || (sc = *s++) == '\0')
return (NULL);
} while (sc != c);
if (len > slen)