From: Jim Meyering Date: Wed, 10 Jul 1996 03:02:54 +0000 (+0000) Subject: (MAXCOST): Use `(unsigned long)1' rather than `(COST)1' X-Git-Tag: TEXTUTILS-1_18e~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e0fdc1a0b339edc06eb8be203be1aec14a3f20d;p=thirdparty%2Fcoreutils.git (MAXCOST): Use `(unsigned long)1' rather than `(COST)1' so the left operand of the << isn't signed. From Kjetil Torgrim Homme. --- diff --git a/src/fmt.c b/src/fmt.c index 6c7b569ce9..f24df5d85d 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))