From: Jim Meyering Date: Tue, 16 Jul 1996 05:14:00 +0000 (+0000) Subject: [OFF_T_MAX]: Use `(unsigned long)1' rather than `(off_t)1' X-Git-Tag: TEXTUTILS-1_19b~153 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03cc8c8ca345b5847d1611c197721269fcb5f281;p=thirdparty%2Fcoreutils.git [OFF_T_MAX]: Use `(unsigned long)1' rather than `(off_t)1' so the left operand of the << isn't signed. From Kaveh Ghazi. --- diff --git a/src/od.c b/src/od.c index 856a837d7a..3708f2d169 100644 --- a/src/od.c +++ b/src/od.c @@ -85,7 +85,8 @@ typedef double LONG_DOUBLE; #endif #ifndef OFF_T_MAX -# define OFF_T_MAX ((off_t)(~((off_t)1 << (sizeof (off_t) * BITSPERBYTE - 1)))) +# define OFF_T_MAX ((off_t)(~((unsigned long)1 << (sizeof (off_t) + * BITSPERBYTE - 1)))) #endif #define STREQ(a,b) (strcmp((a), (b)) == 0)