mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
: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
This commit is contained in:
parent
b97ee15f62
commit
f31a4fc86c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=319159
|
@ -150,7 +150,7 @@ ATF_TEST_CASE_BODY(dnvlist_get_string__default_value)
|
||||||
|
|
||||||
ATF_REQUIRE_EQ(strcmp(dnvlist_get_string(nvl, "hthth", "fd"), "fd"), 0);
|
ATF_REQUIRE_EQ(strcmp(dnvlist_get_string(nvl, "hthth", "fd"), "fd"), 0);
|
||||||
actual_value = dnvlist_get_string(nvl, "5", "5");
|
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);
|
nvlist_destroy(nvl);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue