summaryrefslogtreecommitdiff
path: root/include/c.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/c.h')
-rw-r--r--include/c.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/c.h b/include/c.h
index 0663774d2..eab6ff505 100644
--- a/include/c.h
+++ b/include/c.h
@@ -526,6 +526,6 @@ static inline void print_features(const char **features, const char *prefix)
# define MAP_ANONYMOUS (MAP_ANON)
#endif
-#define SINT_MAX(t) (((size_t) 1 << (sizeof(t) * 8 - 1)) - 1)
+#define SINT_MAX(t) ((t)((~(t) 0) ^ (t) 1 << (sizeof(t) * 8 - 1)))
#endif /* UTIL_LINUX_C_H */