strcmp: Remove unnecessary check for *r

If *l == *r && *l, then by transitivity, *r.
This commit is contained in:
Michael Forney 2013-11-04 21:48:08 -08:00 committed by Rich Felker
parent 8ff810d779
commit b300d5b7bd
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}