vtysh: fix clang warning

cmd->line shall never be null for these sections.

Signed-off-by: Vincent Jardin <vincent.jardin@6wind.com>
This commit is contained in:
Vincent JARDIN 2017-10-08 23:48:55 +02:00
parent 792fa92ec1
commit 47402c0f91

View File

@ -451,7 +451,7 @@ int main(int argc, char **argv, char **env)
exit(ret); exit(ret);
} }
if (dryrun && cmd) { if (dryrun && cmd && cmd->line) {
vtysh_execute("enable"); vtysh_execute("enable");
while (cmd) { while (cmd) {
struct cmd_rec *cr; struct cmd_rec *cr;
@ -552,7 +552,7 @@ int main(int argc, char **argv, char **env)
} }
/* If eval mode. */ /* If eval mode. */
if (cmd) { if (cmd && cmd->line) {
/* Enter into enable node. */ /* Enter into enable node. */
vtysh_execute("enable"); vtysh_execute("enable");