Date: Mon, 29 May 2017 19:02:52 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319159 - head/lib/libnv/tests Message-ID: <201705291902.v4TJ2qMP049605@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Mon May 29 19:02:52 2017 New Revision: 319159 URL: https://svnweb.freebsd.org/changeset/base/319159 Log: :dnvlist_get_string__default_value: fix a bogus string comparison test Check actual_value vs "5", not "5" vs itself. MFC after: 3 days Reported by: Coverity CID: 1362021 Sponsored by: Dell EMC Isilon Modified: head/lib/libnv/tests/dnv_tests.cc Modified: head/lib/libnv/tests/dnv_tests.cc ============================================================================== --- head/lib/libnv/tests/dnv_tests.cc Mon May 29 18:49:28 2017 (r319158) +++ head/lib/libnv/tests/dnv_tests.cc Mon May 29 19:02:52 2017 (r319159) @@ -150,7 +150,7 @@ ATF_TEST_CASE_BODY(dnvlist_get_string__d ATF_REQUIRE_EQ(strcmp(dnvlist_get_string(nvl, "hthth", "fd"), "fd"), 0); actual_value = dnvlist_get_string(nvl, "5", "5"); - ATF_REQUIRE_EQ(strcmp("5", "5"), 0); + ATF_REQUIRE_EQ(strcmp(actual_value, "5"), 0); nvlist_destroy(nvl); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705291902.v4TJ2qMP049605>