From 6a75d16c6d8f9718c925d208538088404c6942aa Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 14 Jul 2013 09:07:11 +0200 Subject: vty: Fix logically dead code in the description handling The code most likely wanted to check the result of argv_concat. To do this we need to dereference the dptr. Logically dead code (DEADCODE) dead_error_line: Execution cannot reach this statement "return 1; Fixes: Coverity CID 1040675 --- src/vty/logging_vty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index a6d2f522..e17c7a8a 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -315,7 +315,7 @@ gDEFUN(cfg_description, cfg_description_cmd, if (*dptr) talloc_free(*dptr); *dptr = argv_concat(argv, argc, 0); - if (!dptr) + if (!*dptr) return CMD_WARNING; return CMD_SUCCESS; -- cgit v1.2.3