diff options
author | Jim Meyering <jim@meyering.net> | 1999-02-01 13:50:12 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-02-01 13:50:12 +0000 |
commit | ca787f30f6a13442cdaeed1403c42daa1a3bc58b (patch) | |
tree | 732aeea2f3ff0901de31ec7114654a5d1c17fc6e | |
parent | ac68c4f0c9746b25c299e75360dc2da6f269f0f3 (diff) | |
download | coreutils-ca787f30f6a13442cdaeed1403c42daa1a3bc58b.tar.xz |
(STRXCASECMP_FUNCTION): Don't increment within macro argument list.
From Akim Demaille.
-rw-r--r-- | lib/strcasecmp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/strcasecmp.c b/lib/strcasecmp.c index 0ae96276d..ae7601de0 100644 --- a/lib/strcasecmp.c +++ b/lib/strcasecmp.c @@ -51,11 +51,14 @@ STRXCASECMP_FUNCTION (const char *s1, const char *s2 STRXCASECMP_DECLARE_N) do { - c1 = TOLOWER (*p1++); - c2 = TOLOWER (*p2++); + c1 = TOLOWER (*p1); + c2 = TOLOWER (*p2); if (LENGTH_LIMIT_EXPR (--n == 0) || c1 == '\0') break; + + ++p1; + ++p2; } while (c1 == c2); |