From: Steven Luong Date: Thu, 21 Feb 2019 19:58:14 +0000 (-0800) Subject: string_test: Coverity woe X-Git-Tag: v19.04-rc1~435 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F59%2F17759%2F1;p=vpp.git 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 --- 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;