Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186268
b: refs/heads/master
c: d6a2eed
h: refs/heads/master
v: v3
  • Loading branch information
André Goddard Rosa authored and Linus Torvalds committed Mar 6, 2010
1 parent 913587f commit c58b7ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a11d2b64e1f2556953120d516241243ea365f0ae
refs/heads/master: d6a2eedfddcded92c8f9b0ac022a99c4134696b0
6 changes: 3 additions & 3 deletions trunk/lib/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -689,13 +689,13 @@ EXPORT_SYMBOL(strstr);
*/
char *strnstr(const char *s1, const char *s2, size_t len)
{
size_t l1 = len, l2;
size_t l2;

l2 = strlen(s2);
if (!l2)
return (char *)s1;
while (l1 >= l2) {
l1--;
while (len >= l2) {
len--;
if (!memcmp(s1, s2, l2))
return (char *)s1;
s1++;
Expand Down

0 comments on commit c58b7ff

Please sign in to comment.