get_map_ranges: initialize argidx to 0 at top of loop
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
7edb32e75f
commit
533d2bab3d
@ -70,7 +70,7 @@ struct map_range *get_map_ranges(int ranges, int argc, char **argv)
|
|||||||
|
|
||||||
/* Gather up the ranges from the command line */
|
/* Gather up the ranges from the command line */
|
||||||
mapping = mappings;
|
mapping = mappings;
|
||||||
for (idx = 0; idx < ranges; idx++, argidx += 3, mapping++) {
|
for (idx = 0, argidx = 0; idx < ranges; idx++, argidx += 3, mapping++) {
|
||||||
if (!getulong(argv[argidx + 0], &mapping->upper)) {
|
if (!getulong(argv[argidx + 0], &mapping->upper)) {
|
||||||
free(mappings);
|
free(mappings);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user