diff options
-rw-r--r-- | firmware/libc/strstr.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/firmware/libc/strstr.c b/firmware/libc/strstr.c index ea1fe9eded..d600bbeb64 100644 --- a/firmware/libc/strstr.c +++ b/firmware/libc/strstr.c | |||
@@ -18,22 +18,22 @@ | |||
18 | 18 | ||
19 | char *strstr(const char *s1, const char *s2) | 19 | char *strstr(const char *s1, const char *s2) |
20 | { | 20 | { |
21 | register const char *s = s1; | 21 | register const char *s = s1; |
22 | register const char *p = s2; | 22 | register const char *p = s2; |
23 | 23 | ||
24 | do { | 24 | do { |
25 | if (!*p) { | 25 | if (!*p) { |
26 | return (char *) s1;; | 26 | return (char *) s1; |
27 | } | 27 | } |
28 | if (*p == *s) { | 28 | if (*p == *s) { |
29 | ++p; | 29 | ++p; |
30 | ++s; | 30 | ++s; |
31 | } else { | 31 | } else { |
32 | p = s2; | 32 | p = s2; |
33 | if (!*s) { | 33 | if (!*s) { |
34 | return NULL; | 34 | return NULL; |
35 | } | 35 | } |
36 | s = ++s1; | 36 | s = ++s1; |
37 | } | 37 | } |
38 | } while (1); | 38 | } while (1); |
39 | } | 39 | } |