summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2013-11-04 21:48:08 -0800
committerRich Felker <dalias@aerifal.cx>2013-11-23 16:17:38 -0500
commitb300d5b7bd74070982da50d996773a2dd8156a01 (patch)
treefc79f57d6220514d913948d2a22e716ed450eb51 /src
parent8ff810d779daa29b78d14e477f5a68b51ed232d1 (diff)
downloadmusl-b300d5b7bd74070982da50d996773a2dd8156a01.tar.gz
strcmp: Remove unnecessary check for *r
If *l == *r && *l, then by transitivity, *r.
Diffstat (limited to 'src')
-rw-r--r--src/string/strcmp.c2
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;
}