summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-09-18 16:28:47 +0000
committerJim Meyering <jim@meyering.net>2003-09-18 16:28:47 +0000
commitdf1f0a8083a53ea3edfacc0d61da8693962925b9 (patch)
tree91743e7904b7c0c44b8fb9deb82e3c148e77570d /src
parent20a24ef30286f59ec304a95826abe6b67b0b1a8d (diff)
downloadcoreutils-df1f0a8083a53ea3edfacc0d61da8693962925b9.tar.xz
(numcompare): Rename local, logb, to log_b to avoid
shadowing the math function name. Also rename loga to log_a.
Diffstat (limited to 'src')
-rw-r--r--src/sort.c22
1 files changed, 11 insertions, 11 deletions
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;