diff options
author | Michael Forney <mforney@mforney.org> | 2013-11-04 21:48:08 -0800 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-11-23 16:17:38 -0500 |
commit | b300d5b7bd74070982da50d996773a2dd8156a01 (patch) | |
tree | fc79f57d6220514d913948d2a22e716ed450eb51 /src/string/strcmp.c | |
parent | 8ff810d779daa29b78d14e477f5a68b51ed232d1 (diff) | |
download | musl-b300d5b7bd74070982da50d996773a2dd8156a01.tar.gz musl-b300d5b7bd74070982da50d996773a2dd8156a01.tar.bz2 musl-b300d5b7bd74070982da50d996773a2dd8156a01.tar.xz musl-b300d5b7bd74070982da50d996773a2dd8156a01.zip |
strcmp: Remove unnecessary check for *r
If *l == *r && *l, then by transitivity, *r.
Diffstat (limited to 'src/string/strcmp.c')
-rw-r--r-- | src/string/strcmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string/strcmp.c b/src/string/strcmp.c index 91eb7404..808bd837 100644 --- a/src/string/strcmp.c +++ b/src/string/strcmp.c @@ -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; } |