compacting line of code
- by dlee313
Assume I have the following:
unsigned int *start;
unsigned int total;
#define OFF_MASK (1 << 31)
#define ON_MASK (~(1 << 31))
if (!(*start & OFF_MASK) && ((*start & ON_MASK) >= total)))
How do I change the above if statement so that it makes just one comparison like this:
if (*start >= total)