mirror of
git://git.sv.gnu.org/coreutils
synced 2026-06-06 07:42:21 -04:00
(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].
This commit is contained in:
+1
-1
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user