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:
Markus Armbruster 2015-07-26 18:00:27 +02:00
parent d58bea5458
commit b9375b14b1
2 changed files with 2 additions and 2 deletions

View file

@ -52,7 +52,7 @@
#endif
#ifndef bit
#define bit(x) (1<<(x))
#define bit(x) (1U<<(x))
#endif
#define minutes(x) (60*(x))