bectl(8): Rename "index" variable, which shadows a global in some lands
This commit is contained in:
parent
3f48dbd1cc
commit
e903601824
@ -116,14 +116,14 @@ static struct command_map_entry command_map[] =
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
get_cmd_index(const char *cmd, int *index)
|
get_cmd_index(const char *cmd, int *idx)
|
||||||
{
|
{
|
||||||
int map_size;
|
int map_size;
|
||||||
|
|
||||||
map_size = nitems(command_map);
|
map_size = nitems(command_map);
|
||||||
for (int i = 0; i < map_size; ++i) {
|
for (int i = 0; i < map_size; ++i) {
|
||||||
if (strcmp(cmd, command_map[i].command) == 0) {
|
if (strcmp(cmd, command_map[i].command) == 0) {
|
||||||
*index = i;
|
*idx = i;
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user