[OFF_T_MAX]: Use `(unsigned long)1' rather than `(off_t)1'
authorJim Meyering <jim@meyering.net>
Tue, 16 Jul 1996 05:14:00 +0000 (05:14 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 16 Jul 1996 05:14:00 +0000 (05:14 +0000)
so the left operand of the << isn't signed.
From Kaveh Ghazi.

src/od.c

index 856a837..3708f2d 100644 (file)
--- 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)