summaryrefslogtreecommitdiff
path: root/src/od.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-07-16 05:14:00 +0000
committerJim Meyering <jim@meyering.net>1996-07-16 05:14:00 +0000
commit03cc8c8ca345b5847d1611c197721269fcb5f281 (patch)
treef563cf251004168ef6981141980b8ff000eda80f /src/od.c
parentdc84f5c5c9bae325bf3f52d3ed5ca0a6b070aa51 (diff)
downloadcoreutils-03cc8c8ca345b5847d1611c197721269fcb5f281.tar.xz
[OFF_T_MAX]: Use `(unsigned long)1' rather than `(off_t)1'
so the left operand of the << isn't signed. From Kaveh Ghazi.
Diffstat (limited to 'src/od.c')
-rw-r--r--src/od.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/od.c b/src/od.c
index 856a837d7..3708f2d16 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)