From: Vincent JARDIN Date: Sun, 8 Oct 2017 21:48:55 +0000 (+0200) Subject: vtysh: fix clang warning X-Git-Tag: frr-4.0-dev~233^2~3 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=47402c0f919557490474cee598405854c65d4cf5;p=matthieu%2Ffrr.git vtysh: fix clang warning cmd->line shall never be null for these sections. Signed-off-by: Vincent Jardin --- diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c index 99c05ef79b..8509a8a05a 100644 --- a/vtysh/vtysh_main.c +++ b/vtysh/vtysh_main.c @@ -451,7 +451,7 @@ int main(int argc, char **argv, char **env) exit(ret); } - if (dryrun && cmd) { + if (dryrun && cmd && cmd->line) { vtysh_execute("enable"); while (cmd) { struct cmd_rec *cr; @@ -552,7 +552,7 @@ int main(int argc, char **argv, char **env) } /* If eval mode. */ - if (cmd) { + if (cmd && cmd->line) { /* Enter into enable node. */ vtysh_execute("enable");