aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/unix_sockets_posix.cc
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2018-03-09 18:32:18 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2018-03-09 18:32:18 -0800
commit4d46260dc552d35b86db463e1f5d5673c610a129 (patch)
treec8c4af30606cd0028a90852bcc24c848844240bf /src/core/lib/iomgr/unix_sockets_posix.cc
parent5f3b474727ab530acb13ec93db9f987b65f57bef (diff)
Explicit static_cast conversions
Diffstat (limited to 'src/core/lib/iomgr/unix_sockets_posix.cc')
-rw-r--r--src/core/lib/iomgr/unix_sockets_posix.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/lib/iomgr/unix_sockets_posix.cc b/src/core/lib/iomgr/unix_sockets_posix.cc
index 8d252fd331..1c464bf97c 100644
--- a/src/core/lib/iomgr/unix_sockets_posix.cc
+++ b/src/core/lib/iomgr/unix_sockets_posix.cc
@@ -61,7 +61,8 @@ grpc_error* grpc_resolve_unix_domain_address(const char* name,
un = reinterpret_cast<struct sockaddr_un*>((*addrs)->addrs->addr);
un->sun_family = AF_UNIX;
strncpy(un->sun_path, name, sizeof(un->sun_path));
- (*addrs)->addrs->len = strlen(un->sun_path) + sizeof(un->sun_family) + 1;
+ (*addrs)->addrs->len =
+ static_cast<socklen_t>(strlen(un->sun_path) + sizeof(un->sun_family) + 1);
return GRPC_ERROR_NONE;
}