summaryrefslogtreecommitdiffstats
path: root/src/bitvec.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-02-18 20:28:25 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-02-18 20:28:25 +0100
commitab0eb96dd9f49aecf6722c0ec01b03d6061cd40e (patch)
treea4f3df4a63a9a802915e77faebefbadbb6f682dd /src/bitvec.c
parent5c18e26bc291766b0de22223abcf340bc48e3157 (diff)
bitvec: Untested speculative UBAN fix for the new routine
int << 31 does not seem to be defined, let's try to make it an unsigned variable and see if that is pleasing the system. Fixes: bitvec.c:219:15: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Diffstat (limited to 'src/bitvec.c')
-rw-r--r--src/bitvec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bitvec.c b/src/bitvec.c
index 592bfc24..00ae1505 100644
--- a/src/bitvec.c
+++ b/src/bitvec.c
@@ -216,7 +216,7 @@ int bitvec_set_uint(struct bitvec *bv, unsigned int ui, unsigned int num_bits)
unsigned i;
for (i = 0; i < num_bits; i++) {
int bit = 0;
- if (ui & (1 << (num_bits - i - 1)))
+ if (ui & (1u << (num_bits - i - 1)))
bit = 1;
rc = bitvec_set_bit(bv, bit);
if (rc)