inet_network on FreeBSD returns NULL when provided "0x" to inet_network

Submitted by: pho
This commit is contained in:
Enji Cooper 2014-11-03 21:26:11 +00:00
parent 43d5532540
commit 5896aab328

View File

@ -144,7 +144,11 @@ ATF_TC_BODY(inet_network_err, tc)
H_REQUIRE(".", 0xffffffff);
H_REQUIRE("1.", 0xffffffff);
H_REQUIRE(".1", 0xffffffff);
#if defined(__FreeBSD__) || defined(__APPLE__)
H_REQUIRE("0x", 0x0);
#else
H_REQUIRE("0x", 0xffffffff);
#endif
H_REQUIRE("", 0xffffffff);
H_REQUIRE(" ", 0xffffffff);
H_REQUIRE("bar", 0xffffffff);