提交 c91cddb6 编写于 作者: E Erik Skultety

vsh: vshCmddefHelp: Drop unnecessary variable 'help'

Since it's used on a single place only, it can easily be replaced by the right
side of the original assignment.
Signed-off-by: NErik Skultety <eskultet@redhat.com>
上级 ebb402a7
......@@ -636,7 +636,6 @@ vshCmddefHelp(vshControl *ctl, const char *cmdname)
} else {
/* Don't translate desc if it is "". */
const char *desc = vshCmddefGetInfo(def, "desc");
const char *help = _(vshCmddefGetInfo(def, "help"));
char buf[256];
uint64_t opts_need_arg;
uint64_t opts_required;
......@@ -649,7 +648,8 @@ vshCmddefHelp(vshControl *ctl, const char *cmdname)
}
fputs(_(" NAME\n"), stdout);
fprintf(stdout, " %s - %s\n", def->name, help);
fprintf(stdout, " %s - %s\n", def->name,
_(vshCmddefGetInfo(def, "help")));
fputs(_("\n SYNOPSIS\n"), stdout);
fprintf(stdout, " %s", def->name);
......@@ -3357,8 +3357,6 @@ cmdSelfTest(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
const vshCmdGrp *grp;
const vshCmdDef *def;
vshPrint(ctl, "Do not use the following output:\n\n");
for (grp = cmdGroups; grp->name; grp++) {
for (def = grp->commands; def->name; def++) {
if (def->flags & VSH_CMD_FLAG_ALIAS)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册