diff options
Diffstat (limited to 'src/core/support/host_port.c')
-rw-r--r-- | src/core/support/host_port.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/support/host_port.c b/src/core/support/host_port.c index 53669f063b..0906ebc2a3 100644 --- a/src/core/support/host_port.c +++ b/src/core/support/host_port.c @@ -76,7 +76,7 @@ void gpr_split_host_port(const char *name, char **host, char **port) { return; } host_start = name + 1; - host_len = rbracket - host_start; + host_len = (size_t)(rbracket - host_start); if (memchr(host_start, ':', host_len) == NULL) { /* Require all bracketed hosts to contain a colon, because a hostname or IPv4 address should never use brackets. */ @@ -87,7 +87,7 @@ void gpr_split_host_port(const char *name, char **host, char **port) { if (colon != NULL && strchr(colon + 1, ':') == NULL) { /* Exactly 1 colon. Split into host:port. */ host_start = name; - host_len = colon - name; + host_len = (size_t)(colon - name); port_start = colon + 1; } else { /* 0 or 2+ colons. Bare hostname or IPv6 litearal. */ |