switch to for loop

This commit is contained in:
illiliti
2020-08-04 16:11:17 +03:00
parent 7754aa691c
commit c0d6c58393
+2 -4
View File
@@ -326,13 +326,11 @@ static int populate_bit(unsigned long *arr, const char *val)
}
bit = strtok_r(bits, " ", &save);
i = 0;
do {
for (i = 0; bit && i < BITS_SIZE; i++) {
arr[i] = strtoul(bit, NULL, 16);
i++;
bit = strtok_r(NULL, " ", &save);
}
while ((bit = strtok_r(NULL, " ", &save)) && i < BITS_SIZE);
free(bits);
return i;