Respect the fact that the value a may be constant so cast to const uint8_t *

This commit is contained in:
Kip Macy 2007-12-06 04:00:59 +00:00
parent 5aaa8fefdf
commit 208e56cb04
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=174327

View File

@ -240,8 +240,8 @@
/* Bit map related macros. */
#define setbit(a,i) (((uint8_t *)(a))[(i)/NBBY] |= 1<<((i)%NBBY))
#define clrbit(a,i) (((uint8_t *)(a))[(i)/NBBY] &= ~(1<<((i)%NBBY)))
#define isset(a,i) (((uint8_t *)(a))[(i)/NBBY] & (1<<((i)%NBBY)))
#define isclr(a,i) ((((uint8_t *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
#define isset(a,i) (((const uint8_t *)(a))[(i)/NBBY] & (1<<((i)%NBBY)))
#define isclr(a,i) ((((const uint8_t *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
/* Macros for counting and rounding. */
#ifndef howmany