]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
sanitize: use 1u (unsigned) for flag bit shifts
authorWolfgang Bumiller <wry.git@bumiller.com>
Tue, 14 Feb 2017 18:17:45 +0000 (19:17 +0100)
committerWolfgang Bumiller <wry.git@bumiller.com>
Tue, 14 Feb 2017 18:25:49 +0000 (19:25 +0100)
Fixes #175

opts.c

diff --git a/opts.c b/opts.c
index e50bd7441791925861f046a3420b1d90e6d0454a..b880ac29c61f0413f5daf3c1ab8fd85dbeb9d444 100644 (file)
--- a/opts.c
+++ b/opts.c
@@ -170,9 +170,9 @@ void opts_set(uint32_t *flags, size_t idx, bool on) {
     LONGBIT_SET(lb, idx);
 
     if (on)
-        flags[lb.idx] |= (1<<(lb.bit));
+        flags[lb.idx] |= (1u<<(lb.bit));
     else
-        flags[lb.idx] &= ~(1<<(lb.bit));
+        flags[lb.idx] &= ~(1u<<(lb.bit));
 }
 
 void opts_setoptimlevel(unsigned int level) {