ahci: redo stopping DMA engines on empty ports
[safe/jmp/linux-2.6] / lib / string.c
index 0f86245..f71bead 100644 (file)
@@ -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++;