Commit d9c3c2ca authored by Mark Andrews's avatar Mark Andrews
Browse files

Merge branch '2013-unchecked-returns-of-inet_pton-in-geoip_test-c-v9_11' into 'v9_11'

check returns from inet_pton()

See merge request !3838
parents d792ed7a d953381d
Pipeline #46606 passed with stages
in 3 minutes and 22 seconds
......@@ -305,8 +305,10 @@ do_lookup_string(const char *addr, uint8_t *scope,
dns_geoip_elem_t elt;
struct in_addr in4;
isc_netaddr_t na;
int n;
inet_pton(AF_INET, addr, &in4);
n = inet_pton(AF_INET, addr, &in4);
assert_int_equal(n, 1);
isc_netaddr_fromin(&na, &in4);
elt.subtype = subtype;
......@@ -322,8 +324,10 @@ do_lookup_string_v6(const char *addr, uint8_t *scope,
dns_geoip_elem_t elt;
struct in6_addr in6;
isc_netaddr_t na;
int n;
inet_pton(AF_INET6, addr, &in6);
n = inet_pton(AF_INET6, addr, &in6);
assert_int_equal(n, 1);
isc_netaddr_fromin6(&na, &in6);
elt.subtype = subtype;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment