diff options
author | Jim Meyering <jim@meyering.net> | 1992-11-08 20:19:58 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1992-11-08 20:19:58 +0000 |
commit | 925487607cfed5d4e68ffa375bc17941934dba07 (patch) | |
tree | d9333d9e8759a18b2ea1b3550319491cce519cb0 /src/sort.c | |
parent | 40d0a06450310c7abc8b393f130fa76de682313d (diff) | |
download | coreutils-925487607cfed5d4e68ffa375bc17941934dba07.tar.xz |
Declared lots of external functions and variables static.
Made several statically-initialized arrays `const'
Diffstat (limited to 'src/sort.c')
-rw-r--r-- | src/sort.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/sort.c b/src/sort.c index de8b937e2..b4522e34a 100644 --- a/src/sort.c +++ b/src/sort.c @@ -87,20 +87,20 @@ static struct month { char *name; int val; -} monthtab[] = +} const monthtab[] = { - "APR", 4, - "AUG", 8, - "DEC", 12, - "FEB", 2, - "JAN", 1, - "JUL", 7, - "JUN", 6, - "MAR", 3, - "MAY", 5, - "NOV", 11, - "OCT", 10, - "SEP", 9 + {"APR", 4}, + {"AUG", 8}, + {"DEC", 12}, + {"FEB", 2}, + {"JAN", 1}, + {"JUL", 7}, + {"JUN", 6}, + {"MAR", 3}, + {"MAY", 5}, + {"NOV", 11}, + {"OCT", 10}, + {"SEP", 9} }; /* During the merge phase, the number of files to merge at once. */ @@ -678,7 +678,7 @@ numcompare (a, b) else logb = 0; - if (tmp = logb - loga) + if ((tmp = logb - loga) != 0) return tmp; if (!loga) @@ -717,7 +717,7 @@ numcompare (a, b) else logb = 0; - if (tmp = loga - logb) + if ((tmp = loga - logb) != 0) return tmp; if (!loga) @@ -875,7 +875,7 @@ keycompare (a, b) if (diff) return key->reverse ? -diff : diff; - if (diff = lena - lenb) + if ((diff = lena - lenb) != 0) return key->reverse ? -diff : diff; } |