Skip to content

Commit 3be3cd6

Browse files
committed
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 <[email protected]>
1 parent 5d0d549 commit 3be3cd6

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/plugins/unittest/string_test.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,6 @@ test_clib_strncmp (vlib_main_t * vm, unformat_input_t * input)
500500
v_indicator = strncmp (s1, "Every moment is a fresh beginning", s1len + 1);
501501
if (v_indicator != 0)
502502
return -1;
503-
if (v_indicator != indicator)
504-
return -1;
505503

506504
/* unterminated s1 */
507505
s1[s1len] = 0x1;

0 commit comments

Comments
 (0)