summaryrefslogtreecommitdiff
path: root/src/fmt.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-07-10 03:02:54 +0000
committerJim Meyering <jim@meyering.net>1996-07-10 03:02:54 +0000
commit3e0fdc1a0b339edc06eb8be203be1aec14a3f20d (patch)
treeec7625641a272c3d7be75aea6a83c29a94995be9 /src/fmt.c
parentc4610f8bb637545977ebcf577e92364b86581cc4 (diff)
downloadcoreutils-3e0fdc1a0b339edc06eb8be203be1aec14a3f20d.tar.gz
coreutils-3e0fdc1a0b339edc06eb8be203be1aec14a3f20d.tar.bz2
coreutils-3e0fdc1a0b339edc06eb8be203be1aec14a3f20d.zip
(MAXCOST): Use `(unsigned long)1' rather than `(COST)1'
so the left operand of the << isn't signed. From Kjetil Torgrim Homme.
Diffstat (limited to 'src/fmt.c')
-rw-r--r--src/fmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fmt.c b/src/fmt.c
index 6c7b569ce..f24df5d85 100644
--- a/src/fmt.c
+++ b/src/fmt.c
@@ -65,7 +65,7 @@
typedef long COST;
-#define MAXCOST (~(((COST) 1) << (8 * sizeof (COST) -1)))
+#define MAXCOST (~(((unsigned long) 1) << (8 * sizeof (COST) -1)))
#define SQR(n) ((n) * (n))
#define EQUIV(n) SQR ((COST) (n))