]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(CMP_WITH_IGNORE): Don't assume that the difference
authorJim Meyering <jim@meyering.net>
Mon, 21 Jan 2002 22:02:28 +0000 (22:02 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 21 Jan 2002 22:02:28 +0000 (22:02 +0000)
between two size_t values can be stored in an int; this doesn't
work, for example, on 64-bit Solaris.

src/sort.c

index ac82dcf715888c8a9659c7e5341bbe26a42073aa..409071a302879c5a07333965d391cd322db706d0 100644 (file)
@@ -1431,7 +1431,7 @@ keycompare (const struct line *a, const struct line *b)
              ++textb;                                                  \
            }                                                           \
                                                                        \
-         diff = (lima - texta) - (limb - textb);                       \
+         diff = (texta < lima) - (textb < limb);                       \
     }                                                                  \
   while (0)