Merge branch 'sint-max' of https://github.com/t-8ch/util-linux
* 'sint-max' of https://github.com/t-8ch/util-linux: c.h: avoid undefined behavior in SINT_MAX macro
This commit is contained in:
commit
8d9215504c
1 changed files with 1 additions and 1 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue