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: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
Erik Skultety 2016-09-16 14:32:01 +02:00
parent ebb402a7c4
commit c91cddb6f7

View File

@ -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)