Fix the definition of RM_MAX_END.

Even though casting from signed to unsigned is well-defined in C, it's better to
first cast to the larger unsigned type, then negate.
This commit is contained in:
Justin Hibbits 2016-02-20 01:34:13 +00:00
parent 7915adb560
commit e903856979

View File

@ -61,7 +61,7 @@ enum rman_type { RMAN_UNINIT = 0, RMAN_GAUGE, RMAN_ARRAY };
*/
#define RM_TEXTLEN 32
#define RM_MAX_END ((rman_res_t)~0)
#define RM_MAX_END (~(rman_res_t)0)
#define RMAN_IS_DEFAULT_RANGE(s,e) ((s) == 0 && (e) == RM_MAX_END)