From 65ce5c6ad5a37ccc05c77c0c2b3b590cea22e2da Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 19 Mar 2018 16:48:22 -0700 Subject: [PATCH] scoutfs-utils: clean up _MAX defines Signed-off-by: Zach Brown --- utils/src/sparse.h | 2 -- utils/src/util.h | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/src/sparse.h b/utils/src/sparse.h index 34fbbbaa..22628018 100644 --- a/utils/src/sparse.h +++ b/utils/src/sparse.h @@ -34,8 +34,6 @@ typedef u32 __u32; typedef s32 __s32; typedef u64 __u64; -#define U16_MAX ((u16)~0) - typedef u16 __sp_biwise __le16; typedef u16 __sp_biwise __be16; typedef u32 __sp_biwise __le32; diff --git a/utils/src/util.h b/utils/src/util.h index 89ec4b4f..3ed72701 100644 --- a/utils/src/util.h +++ b/utils/src/util.h @@ -61,6 +61,10 @@ do { \ ((type *)((void *)(ptr) - offsetof(type, memb))) #define BITS_PER_LONG (sizeof(long) * 8) +#define U8_MAX ((u8)~0ULL) +#define U16_MAX ((u16)~0ULL) +#define U32_MAX ((u32)~0ULL) +#define U64_MAX ((u64)~0ULL) /* * return -1,0,+1 based on the memcmp comparison of the minimum of their