提交 d7079ec9 编写于 作者: N Nishith Shah 提交者: Michal Privoznik

virsh: Fix variable types in readline generators

Use unsigned int for array indexes and size_t for length variables.
Signed-off-by: NNishith Shah <nishithshah.2211@gmail.com>
上级 2432521e
...@@ -2537,7 +2537,8 @@ vshTreePrint(vshControl *ctl, vshTreeLookup lookup, void *opaque, ...@@ -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) ...@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册