From ca787f30f6a13442cdaeed1403c42daa1a3bc58b Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 1 Feb 1999 13:50:12 +0000 Subject: (STRXCASECMP_FUNCTION): Don't increment within macro argument list. From Akim Demaille. --- lib/strcasecmp.c | 7 +++++-- 1 file 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); -- cgit v1.2.3-70-g09d2