From 3be3cd60bc41d095174ea413aa753a7bd9eff73e Mon Sep 17 00:00:00 2001 From: Steven Luong Date: Thu, 21 Feb 2019 11:58:14 -0800 Subject: string_test: Coverity woe Coverity complains about dead code as shown below and it is right. The fix is to simply remove the dead code. 503 if (v_indicator != indicator) CID 190173 (#3 of 3): Logically dead code (DEADCODE) dead_error_line: Execution cannot reach this statement: return -1;. 504 return -1; Change-Id: Ibca9e10451a4459db099bef5ecc6939474bdb903 Signed-off-by: Steven Luong --- src/plugins/unittest/string_test.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/plugins/unittest/string_test.c b/src/plugins/unittest/string_test.c index cbceb8fb3b2..7e08bdfa29c 100644 --- a/src/plugins/unittest/string_test.c +++ b/src/plugins/unittest/string_test.c @@ -500,8 +500,6 @@ test_clib_strncmp (vlib_main_t * vm, unformat_input_t * input) v_indicator = strncmp (s1, "Every moment is a fresh beginning", s1len + 1); if (v_indicator != 0) return -1; - if (v_indicator != indicator) - return -1; /* unterminated s1 */ s1[s1len] = 0x1; -- cgit 1.2.3-korg