Skip to content

Commit 6ad091d

Browse files
authored
Merge pull request libgit2#4176 from libgit2/ethomson/3872
inet_pton: don't assume addr families don't exist
2 parents f623cf8 + 983979f commit 6ad091d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tests/core/posix.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,7 @@ void test_core_posix__inet_pton(void)
9494
cl_assert(p_inet_pton(AF_INET, "10.foo.bar.1", &addr) == 0);
9595

9696
/* Test unsupported address families */
97-
cl_git_fail(p_inet_pton(12, "52.472", &addr)); /* AF_DECnet */
98-
cl_assert_equal_i(EAFNOSUPPORT, errno);
99-
100-
cl_git_fail(p_inet_pton(5, "315.124", &addr)); /* AF_CHAOS */
97+
cl_git_fail(p_inet_pton(INT_MAX-1, "52.472", &addr));
10198
cl_assert_equal_i(EAFNOSUPPORT, errno);
10299
}
103100

0 commit comments

Comments
 (0)