mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
strstr(): cosmetics
remove extra ';' replace tabs by spaces git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27396 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8a07e78a06
commit
c9f997cc91
1 changed files with 17 additions and 17 deletions
|
@ -18,22 +18,22 @@
|
||||||
|
|
||||||
char *strstr(const char *s1, const char *s2)
|
char *strstr(const char *s1, const char *s2)
|
||||||
{
|
{
|
||||||
register const char *s = s1;
|
register const char *s = s1;
|
||||||
register const char *p = s2;
|
register const char *p = s2;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (!*p) {
|
if (!*p) {
|
||||||
return (char *) s1;;
|
return (char *) s1;
|
||||||
}
|
}
|
||||||
if (*p == *s) {
|
if (*p == *s) {
|
||||||
++p;
|
++p;
|
||||||
++s;
|
++s;
|
||||||
} else {
|
} else {
|
||||||
p = s2;
|
p = s2;
|
||||||
if (!*s) {
|
if (!*s) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
s = ++s1;
|
s = ++s1;
|
||||||
}
|
}
|
||||||
} while (1);
|
} while (1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue