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);
}
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"