newlib: libc: Improved the readability of strspn with minor optimization
Signed-off-by: Xiao Zeng <zengxiao@eswincomputing.com>
This commit is contained in:
parent
26f7004bf7
commit
99f3898dfc
|
@ -41,10 +41,11 @@ strspn (const char *s1,
|
|||
for (c = s2; *c; c++)
|
||||
{
|
||||
if (*s1 == *c)
|
||||
break;
|
||||
goto found;
|
||||
}
|
||||
if (*c == '\0')
|
||||
break;
|
||||
found:
|
||||
s1++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue