aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/util/port_posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/util/port_posix.c')
-rw-r--r--test/core/util/port_posix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/core/util/port_posix.c b/test/core/util/port_posix.c
index 0a50660586..732a51c5cb 100644
--- a/test/core/util/port_posix.c
+++ b/test/core/util/port_posix.c
@@ -174,7 +174,7 @@ static int is_port_available(int *port, int is_tcp) {
/* Try binding to port */
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = INADDR_ANY;
- addr.sin_port = htons((gpr_uint16)*port);
+ addr.sin_port = htons((uint16_t)*port);
if (bind(fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
gpr_log(GPR_DEBUG, "bind(port=%d) failed: %s", *port, strerror(errno));
close(fd);