summaryrefslogtreecommitdiffstats
path: root/vtysh/vtysh_main.c
diff options
context:
space:
mode:
authorVincent JARDIN <vincent.jardin@6wind.com>2017-10-08 23:48:55 +0200
committerVincent JARDIN <vincent.jardin@6wind.com>2017-10-08 23:48:55 +0200
commit47402c0f919557490474cee598405854c65d4cf5 (patch)
tree1a59f0ead4b9e65762f31eb77ea17ecc6a1f1f0a /vtysh/vtysh_main.c
parentzebra: fix clang warning (diff)
downloadfrr-47402c0f919557490474cee598405854c65d4cf5.tar.xz
frr-47402c0f919557490474cee598405854c65d4cf5.zip
vtysh: fix clang warning
cmd->line shall never be null for these sections. Signed-off-by: Vincent Jardin <vincent.jardin@6wind.com>
Diffstat (limited to '')
-rw-r--r--vtysh/vtysh_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c
index 99c05ef79..8509a8a05 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");