diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index baeae86d8c..4153f1c0b0 100644 --- a/qemu-io-cmds.c +++ b/qemu-io-cmds.c @@ -2383,14 +2383,7 @@ static const cmdinfo_t sleep_cmd = { static void help_oneline(const char *cmd, const cmdinfo_t *ct) { - if (cmd) { - printf("%s ", cmd); - } else { - printf("%s ", ct->name); - if (ct->altname) { - printf("(or %s) ", ct->altname); - } - } + printf("%s ", cmd); if (ct->args) { printf("%s ", ct->args); @@ -2420,7 +2413,7 @@ static int help_f(BlockBackend *blk, int argc, char **argv) { const cmdinfo_t *ct; - if (argc == 1) { + if (argc < 2) { help_all(); return 0; }