From 88a386b9c87072787a3b712073cbf19a74b0bd20 Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Tue, 26 Apr 2016 21:42:23 +0530 Subject: rpc: fix gf_process_reserved_ports this patch also does minor code cleanups. Change-Id: I0d005bd0f9baaaae498aa1df4faa6fcb65fa7a6e BUG: 1198849 Signed-off-by: Prasanna Kumar Kalever Reviewed-on: http://review.gluster.org/13997 Tested-by: Prasanna Kumar Kalever Smoke: Gluster Build System Reviewed-by: Atin Mukherjee CentOS-regression: Gluster Build System Reviewed-by: Jeff Darcy NetBSD-regression: NetBSD Build System --- rpc/rpc-transport/rdma/src/name.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'rpc/rpc-transport/rdma/src/name.c') diff --git a/rpc/rpc-transport/rdma/src/name.c b/rpc/rpc-transport/rdma/src/name.c index 93b249855e1..d4502e766bf 100644 --- a/rpc/rpc-transport/rdma/src/name.c +++ b/rpc/rpc-transport/rdma/src/name.c @@ -56,15 +56,9 @@ af_inet_bind_to_port_lt_ceiling (struct rdma_cm_id *cm_id, { int32_t ret = -1; uint16_t port = ceiling - 1; - /* by default assume none of the ports are blocked and all are available */ - gf_boolean_t ports[GF_PORT_MAX] = {_gf_false,}; - int i = 0; + gf_boolean_t ports[GF_PORT_MAX]; ret = gf_process_reserved_ports (ports, ceiling); - if (ret != 0) { - for (i = 0; i < GF_PORT_MAX; i++) - ports[i] = _gf_false; - } while (port) { /* ignore the reserved ports */ -- cgit