Cleanup from socklen_t changes

pull/14920/head
Yash Tibrewal 7 years ago
parent 0b49467404
commit f3651a6573
  1. 1
      src/core/lib/iomgr/socket_utils_linux.cc
  2. 5
      src/core/lib/iomgr/socket_utils_posix.cc

@ -33,7 +33,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));
flags |= nonblock ? SOCK_NONBLOCK : 0;
flags |= cloexec ? SOCK_CLOEXEC : 0;
return accept4(sockfd, reinterpret_cast<grpc_sockaddr*>(resolved_addr->addr),

@ -34,9 +34,8 @@
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));
fd = accept(sockfd, (grpc_sockaddr*)resolved_addr->addr,
(socklen_t*)&resolved_addr->len);
fd = accept(sockfd, reinterpret_cast<grpc_sockaddr*>(resolved_addr->addr),
&resolved_addr->len);
if (fd >= 0) {
if (nonblock) {
flags = fcntl(fd, F_GETFL, 0);

Loading…
Cancel
Save