From 69818c696445298ce1f8e95c2f6eefc48f0b9197 Mon Sep 17 00:00:00 2001 From: Steven Luong Date: Wed, 27 Feb 2019 08:19:27 -0800 Subject: string_test: The dark side of coverity Me: "Mr Coverity, I thought I fixed the dead code warning just few days ago in this file. Why are you still complaining about the same stuff to me?" Mr. Coverity: "Duh! But you are supposed to fix all occurences in the same file." Me: "Mr. Coverity, I didn't see you flag the warning in the other places last time?" Mr. Coverity: "Shh! That is the secret of my dark side!" Change-Id: I565eccd90bf1bb39c9881664d361f83396ca8bcc Signed-off-by: Steven Luong --- src/plugins/unittest/string_test.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/unittest/string_test.c b/src/plugins/unittest/string_test.c index 7e08bdfa29c..5016a86ac82 100644 --- a/src/plugins/unittest/string_test.c +++ b/src/plugins/unittest/string_test.c @@ -442,8 +442,6 @@ test_clib_strncmp (vlib_main_t * vm, unformat_input_t * input) v_indicator = strncmp (s1, "Every moment is a fresh beginning", s1len); if (v_indicator != 0) return -1; - if (v_indicator != indicator) - return -1; /* s1 > s2, 0 is expected since comparison is no more than n character */ indicator = clib_strncmp (s1, "Every moment is a fresh begin", @@ -455,8 +453,6 @@ test_clib_strncmp (vlib_main_t * vm, unformat_input_t * input) sizeof ("Every moment is a fresh begin") - 1); if (v_indicator != 0) return -1; - if (v_indicator != indicator) - return -1; /* s1 < s2, < 0 is expected */ indicator = clib_strncmp (s1, "Every moment is fresh beginning", -- cgit 1.2.3-korg