Author: jhibbits
Date: Sat Feb 20 01:34:13 2016
New Revision: 295833
URL: https://svnweb.freebsd.org/changeset/base/295833
Log:
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.
Modified:
head/sys/sys/rman.h
Modified: head/sys/sys/rman.h
==============================================================================
--- head/sys/sys/rman.h Sat Feb 20 01:32:58 2016 (r295832)
+++ head/sys/sys/rman.h Sat Feb 20 01:34:13 2016 (r295833)
@@ -61,7 +61,7 @@ enum rman_type { RMAN_UNINIT = 0, RMAN_G
*/
#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)
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"