tweaks: avoid a runtime error when compiled with -fsanitize=undefined

This fixes https://savannah.gnu.org/bugs/?48540.
master
Benno Schulenberg 2016-07-22 15:35:22 +02:00
parent 41ad376b70
commit 04b9b9c78b
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@
/* Macros for flags, indexing each bit in a small array. */
#define FLAGS(flag) flags[((flag) / (sizeof(unsigned) * 8))]
#define FLAGMASK(flag) (1 << ((flag) % (sizeof(unsigned) * 8)))
#define FLAGMASK(flag) ((unsigned)1 << ((flag) % (sizeof(unsigned) * 8)))
#define SET(flag) FLAGS(flag) |= FLAGMASK(flag)
#define UNSET(flag) FLAGS(flag) &= ~FLAGMASK(flag)
#define ISSET(flag) ((FLAGS(flag) & FLAGMASK(flag)) != 0)