diff options
Diffstat (limited to 'test/core/client_channel/parse_address_test.cc')
-rw-r--r-- | test/core/client_channel/parse_address_test.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/core/client_channel/parse_address_test.cc b/test/core/client_channel/parse_address_test.cc index 5ad6c6d015..938cef309e 100644 --- a/test/core/client_channel/parse_address_test.cc +++ b/test/core/client_channel/parse_address_test.cc @@ -62,7 +62,7 @@ static void test_grpc_parse_ipv4(const char* uri_text, const char* host, GPR_ASSERT(1 == grpc_parse_ipv4(uri, &addr)); struct sockaddr_in* addr_in = (struct sockaddr_in*)addr.addr; GPR_ASSERT(AF_INET == addr_in->sin_family); - GPR_ASSERT(NULL != grpc_inet_ntop(AF_INET, &addr_in->sin_addr, ntop_buf, + GPR_ASSERT(nullptr != grpc_inet_ntop(AF_INET, &addr_in->sin_addr, ntop_buf, sizeof(ntop_buf))); GPR_ASSERT(0 == strcmp(ntop_buf, host)); GPR_ASSERT(ntohs(addr_in->sin_port) == port); @@ -81,7 +81,7 @@ static void test_grpc_parse_ipv6(const char* uri_text, const char* host, GPR_ASSERT(1 == grpc_parse_ipv6(uri, &addr)); struct sockaddr_in6* addr_in6 = (struct sockaddr_in6*)addr.addr; GPR_ASSERT(AF_INET6 == addr_in6->sin6_family); - GPR_ASSERT(NULL != grpc_inet_ntop(AF_INET6, &addr_in6->sin6_addr, ntop_buf, + GPR_ASSERT(nullptr != grpc_inet_ntop(AF_INET6, &addr_in6->sin6_addr, ntop_buf, sizeof(ntop_buf))); GPR_ASSERT(0 == strcmp(ntop_buf, host)); GPR_ASSERT(ntohs(addr_in6->sin6_port) == port); |