Commit 04b9b9c7 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

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

This fixes https://savannah.gnu.org/bugs/?48540.
No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment