summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-07-27 22:05:43 +0000
committerJim Meyering <jim@meyering.net>2003-07-27 22:05:43 +0000
commit682d905a29896bb25b33cffdd62b5e5487ada4eb (patch)
tree83e53a8192b3556b5e47cc16a9ba0ebcf217a2ea /src
parent446a751f638c330bb7229fadeb95543fd454cc9d (diff)
downloadcoreutils-682d905a29896bb25b33cffdd62b5e5487ada4eb.tar.xz
(sortlines_temp): Declare local `swap' to be `int', not
`bool'. Otherwise, at least one buggy compiler (alpha gcc-2.95.4) would cause lines[-1 - swap] (with swap = false) to evaluate to lines[4294967295].
Diffstat (limited to 'src')
-rw-r--r--src/sort.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sort.c b/src/sort.c
index e9a8354c4..fd9922120 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -1863,7 +1863,7 @@ sortlines_temp (struct line *lines, size_t nlines, struct line *temp)
{
if (nlines == 2)
{
- bool swap = (0 < compare (&lines[-1], &lines[-2]));
+ int swap = (0 < compare (&lines[-1], &lines[-2]));
temp[-1] = lines[-1 - swap];
temp[-2] = lines[-2 + swap];
}