diff options
author | jhibbits <jhibbits@FreeBSD.org> | 2016-02-20 01:34:13 +0000 |
---|---|---|
committer | jhibbits <jhibbits@FreeBSD.org> | 2016-02-20 01:34:13 +0000 |
commit | 17728bcf02f94c1fd05f9ba7fdc8498053209891 (patch) | |
tree | 3388fa9448434a311ed3dc7178e0deb3b084acea /sys/sys/rman.h | |
parent | f8385663eeba2c10cd82a51c0a461a4f932458a3 (diff) | |
download | FreeBSD-src-17728bcf02f94c1fd05f9ba7fdc8498053209891.zip FreeBSD-src-17728bcf02f94c1fd05f9ba7fdc8498053209891.tar.gz |
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.
Diffstat (limited to 'sys/sys/rman.h')
-rw-r--r-- | sys/sys/rman.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/rman.h b/sys/sys/rman.h index 76db630..2d58f4a 100644 --- a/sys/sys/rman.h +++ b/sys/sys/rman.h @@ -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) |