aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bitvec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bitvec.c b/src/bitvec.c
index f9341b70..2db62efa 100644
--- a/src/bitvec.c
+++ b/src/bitvec.c
@@ -383,10 +383,12 @@ unsigned int bitvec_unpack(struct bitvec *bv, const uint8_t *buffer)
int bitvec_unhex(struct bitvec *bv, const char *src)
{
+ unsigned i;
unsigned val;
unsigned write_index = 0;
unsigned digits = bv->data_len * 2;
- for (unsigned i = 0; i < digits; i++) {
+
+ for (i = 0; i < digits; i++) {
if (sscanf(src + i, "%1x", &val) < 1) {
return 1;
}