diff --git a/src/core/lib/iomgr/socket_utils_linux.cc b/src/core/lib/iomgr/socket_utils_linux.cc index f506329f970..b0207578de1 100644 --- a/src/core/lib/iomgr/socket_utils_linux.cc +++ b/src/core/lib/iomgr/socket_utils_linux.cc @@ -34,7 +34,6 @@ int grpc_accept4(int sockfd, grpc_resolved_address* resolved_addr, int nonblock, int cloexec) { int flags = 0; GPR_ASSERT(sizeof(socklen_t) <= sizeof(size_t)); - GPR_ASSERT(resolved_addr->len <= (socklen_t)-1); flags |= nonblock ? SOCK_NONBLOCK : 0; flags |= cloexec ? SOCK_CLOEXEC : 0; return accept4(sockfd, reinterpret_cast(resolved_addr->addr), diff --git a/src/core/lib/iomgr/socket_utils_posix.cc b/src/core/lib/iomgr/socket_utils_posix.cc index d5d00af9760..2a49583ac4e 100644 --- a/src/core/lib/iomgr/socket_utils_posix.cc +++ b/src/core/lib/iomgr/socket_utils_posix.cc @@ -35,7 +35,6 @@ int grpc_accept4(int sockfd, grpc_resolved_address* resolved_addr, int nonblock, int cloexec) { int fd, flags; GPR_ASSERT(sizeof(socklen_t) <= sizeof(size_t)); - GPR_ASSERT(resolved_addr->len <= (socklen_t)-1); fd = accept(sockfd, (grpc_sockaddr*)resolved_addr->addr, (socklen_t*)&resolved_addr->len); if (fd >= 0) { diff --git a/src/core/lib/iomgr/tcp_server_utils_posix_common.cc b/src/core/lib/iomgr/tcp_server_utils_posix_common.cc index 0734453364a..9f4e58ca16e 100644 --- a/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +++ b/src/core/lib/iomgr/tcp_server_utils_posix_common.cc @@ -170,7 +170,6 @@ grpc_error* grpc_tcp_server_prepare_socket(int fd, err = grpc_set_socket_no_sigpipe_if_possible(fd); if (err != GRPC_ERROR_NONE) goto error; - GPR_ASSERT(addr->len < ~(socklen_t)0); if (bind(fd, reinterpret_cast(const_cast(addr->addr)), addr->len) < 0) { err = GRPC_OS_ERROR(errno, "bind"); diff --git a/src/core/lib/iomgr/udp_server.cc b/src/core/lib/iomgr/udp_server.cc index 04716a254d1..9990deec7a3 100644 --- a/src/core/lib/iomgr/udp_server.cc +++ b/src/core/lib/iomgr/udp_server.cc @@ -381,7 +381,6 @@ static int prepare_socket(grpc_socket_factory* socket_factory, int fd, } } - GPR_ASSERT(addr->len < ~(socklen_t)0); if (bind_socket(socket_factory, fd, addr) < 0) { char* addr_str; grpc_sockaddr_to_string(&addr_str, addr, 0);