virsh: Fix variable types in readline generators

Use unsigned int for array indexes and size_t for length variables.

Signed-off-by: Nishith Shah <nishithshah.2211@gmail.com>
This commit is contained in:
Nishith Shah 2016-07-08 18:26:03 +05:30 committed by Michal Privoznik
parent 2432521e03
commit d7079ec98e

View File

@ -2537,7 +2537,8 @@ vshTreePrint(vshControl *ctl, vshTreeLookup lookup, void *opaque,
static char * static char *
vshReadlineCommandGenerator(const char *text, int state) vshReadlineCommandGenerator(const char *text, int state)
{ {
static int grp_list_index, cmd_list_index, len; static unsigned int grp_list_index, cmd_list_index;
static size_t len;
const char *name; const char *name;
const vshCmdGrp *grp; const vshCmdGrp *grp;
const vshCmdDef *cmds; const vshCmdDef *cmds;
@ -2576,7 +2577,8 @@ vshReadlineCommandGenerator(const char *text, int state)
static char * static char *
vshReadlineOptionsGenerator(const char *text, int state) vshReadlineOptionsGenerator(const char *text, int state)
{ {
static int list_index, len; static unsigned int list_index;
static size_t len;
static const vshCmdDef *cmd; static const vshCmdDef *cmd;
const char *name; const char *name;