strcmp: Remove unnecessary check for *r
If *l == *r && *l, then by transitivity, *r.
This commit is contained in:
parent
8ff810d779
commit
b300d5b7bd
1 changed files with 1 additions and 1 deletions
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
int strcmp(const char *l, const char *r)
|
||||
{
|
||||
for (; *l==*r && *l && *r; l++, r++);
|
||||
for (; *l==*r && *l; l++, r++);
|
||||
return *(unsigned char *)l - *(unsigned char *)r;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue