Avoid shifting into sign bit
It's undefined behavior. Found with gcc -fsanitize=undefined. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
d58bea5458
commit
b9375b14b1
2 changed files with 2 additions and 2 deletions
|
@ -52,7 +52,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef bit
|
||||
#define bit(x) (1<<(x))
|
||||
#define bit(x) (1U<<(x))
|
||||
#endif
|
||||
|
||||
#define minutes(x) (60*(x))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue