From df1f0a8083a53ea3edfacc0d61da8693962925b9 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 18 Sep 2003 16:28:47 +0000 Subject: (numcompare): Rename local, logb, to log_b to avoid shadowing the math function name. Also rename loga to log_a. --- src/sort.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/sort.c b/src/sort.c index 22b51e197..1b4e4a400 100644 --- a/src/sort.c +++ b/src/sort.c @@ -1133,7 +1133,7 @@ static int numcompare (register const char *a, register const char *b) { register int tmpa, tmpb, tmp; - register size_t loga, logb; + register size_t log_a, log_b; tmpa = *a; tmpb = *b; @@ -1186,20 +1186,20 @@ numcompare (register const char *a, register const char *b) tmp = tmpb - tmpa; - for (loga = 0; ISDIGIT (tmpa); ++loga) + for (log_a = 0; ISDIGIT (tmpa); ++log_a) do tmpa = *++a; while (IS_THOUSANDS_SEP (tmpa)); - for (logb = 0; ISDIGIT (tmpb); ++logb) + for (log_b = 0; ISDIGIT (tmpb); ++log_b) do tmpb = *++b; while (IS_THOUSANDS_SEP (tmpb)); - if (loga != logb) - return loga < logb ? 1 : -1; + if (log_a != log_b) + return log_a < log_b ? 1 : -1; - if (!loga) + if (!log_a) return 0; return tmp; @@ -1248,20 +1248,20 @@ numcompare (register const char *a, register const char *b) tmp = tmpa - tmpb; - for (loga = 0; ISDIGIT (tmpa); ++loga) + for (log_a = 0; ISDIGIT (tmpa); ++log_a) do tmpa = *++a; while (IS_THOUSANDS_SEP (tmpa)); - for (logb = 0; ISDIGIT (tmpb); ++logb) + for (log_b = 0; ISDIGIT (tmpb); ++log_b) do tmpb = *++b; while (IS_THOUSANDS_SEP (tmpb)); - if (loga != logb) - return loga < logb ? -1 : 1; + if (log_a != log_b) + return log_a < log_b ? -1 : 1; - if (!loga) + if (!log_a) return 0; return tmp; -- cgit v1.2.3-70-g09d2