aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/surface/server_chttp2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/surface/server_chttp2.c')
-rw-r--r--src/core/surface/server_chttp2.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/surface/server_chttp2.c b/src/core/surface/server_chttp2.c
index 990bc4aa23..5ce7c1955b 100644
--- a/src/core/surface/server_chttp2.c
+++ b/src/core/surface/server_chttp2.c
@@ -101,9 +101,7 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) {
}
tcp = grpc_tcp_server_create();
- if (!tcp) {
- goto error;
- }
+ GPR_ASSERT(tcp);
for (i = 0; i < resolved->naddrs; i++) {
grpc_tcp_listener *listener;
@@ -111,7 +109,7 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) {
tcp, (struct sockaddr *)&resolved->addrs[i].addr,
resolved->addrs[i].len);
port_temp = grpc_tcp_listener_get_port(listener);
- if (port_temp >= 0) {
+ if (port_temp > 0) {
if (port_num == -1) {
port_num = port_temp;
} else {