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:
parent
7915adb560
commit
e903856979
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user