Specify 1U over 1 for bitmaps
This commit is contained in:
@@ -131,10 +131,10 @@
|
|||||||
#define ssizeof(_x) ((ssize_t)sizeof(_x))
|
#define ssizeof(_x) ((ssize_t)sizeof(_x))
|
||||||
|
|
||||||
/* Bit map macros. */
|
/* Bit map macros. */
|
||||||
#define sudo_setbit(_a, _i) ((_a)[(_i) / NBBY] |= 1 << ((_i) % NBBY))
|
#define sudo_setbit(_a, _i) ((_a)[(_i) / NBBY] |= 1U << ((_i) % NBBY))
|
||||||
#define sudo_clrbit(_a, _i) ((_a)[(_i) / NBBY] &= ~(1<<((_i) % NBBY)))
|
#define sudo_clrbit(_a, _i) ((_a)[(_i) / NBBY] &= ~(1U << ((_i) % NBBY)))
|
||||||
#define sudo_isset(_a, _i) ((_a)[(_i) / NBBY] & (1<<((_i) % NBBY)))
|
#define sudo_isset(_a, _i) ((_a)[(_i) / NBBY] & (1U << ((_i) % NBBY)))
|
||||||
#define sudo_isclr(_a, _i) (((_a)[(_i) / NBBY] & (1<<((_i) % NBBY))) == 0)
|
#define sudo_isclr(_a, _i) (((_a)[(_i) / NBBY] & (1U << ((_i) % NBBY))) == 0)
|
||||||
|
|
||||||
/* Macros to determine the length of a type in string form. */
|
/* Macros to determine the length of a type in string form. */
|
||||||
#define STRLEN_MAX_UNSIGNED(t) (((sizeof(t) * 8 * 1233) >> 12) + 1)
|
#define STRLEN_MAX_UNSIGNED(t) (((sizeof(t) * 8 * 1233) >> 12) + 1)
|
||||||
|
@@ -55,11 +55,11 @@
|
|||||||
|
|
||||||
/* Align address to a (compat) word boundary. */
|
/* Align address to a (compat) word boundary. */
|
||||||
#define WORDALIGN(_a, _r) \
|
#define WORDALIGN(_a, _r) \
|
||||||
(((_a) + ((long)(_r).wordsize - 1L)) & ~((long)(_r).wordsize - 1L))
|
(((_a) + ((unsigned long)(_r).wordsize - 1UL)) & ~((unsigned long)(_r).wordsize - 1UL))
|
||||||
|
|
||||||
/* Align pointer to a native word boundary. */
|
/* Align pointer to a native word boundary. */
|
||||||
#define LONGALIGN(_p) \
|
#define LONGALIGN(_p) \
|
||||||
(((unsigned long)(_p) + (sizeof(long) - 1)) & ~(sizeof(long) - 1))
|
(((unsigned long)(_p) + (sizeof(unsigned long) - 1UL)) & ~(sizeof(unsigned long) - 1UL))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* See syscall(2) for a list of registers used in system calls.
|
* See syscall(2) for a list of registers used in system calls.
|
||||||
|
Reference in New Issue
Block a user