From: Steven Date: Sun, 6 Jan 2019 19:23:24 +0000 (-0800) Subject: string_test: coverity woe X-Git-Tag: v19.04-rc0~32 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F00%2F16700%2F2;p=vpp.git string_test: coverity woe Remove the needless tests and checks which coverity complains about in string_test.c Change-Id: I971650cada77136f06528a65625ef99bd3d7e915 Signed-off-by: Steven --- diff --git a/src/plugins/unittest/string_test.c b/src/plugins/unittest/string_test.c index 65b7c62ece8..0d41bb27918 100644 --- a/src/plugins/unittest/string_test.c +++ b/src/plugins/unittest/string_test.c @@ -349,10 +349,6 @@ test_clib_strcmp (vlib_main_t * vm, unformat_input_t * input) /* Null pointers comparison */ s = 0; indicator = clib_strcmp (s, s); - if (indicator != 0) - return -1; - /* verify it against strcmp */ - indicator = strcmp (s, s); if (indicator != 0) return -1; @@ -518,8 +514,6 @@ test_clib_strncmp (vlib_main_t * vm, unformat_input_t * input) sizeof ("Every moment is a fresh beginning") - 1); if (v_indicator != 0) return -1; - if (v_indicator != indicator) - return -1; /* OK, seems to work */ return 0;