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 --- libglusterfs/src/common-utils.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libglusterfs/src') diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index bfddfc3124c..a1a4c7d43ae 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -2980,6 +2980,12 @@ int gf_process_reserved_ports (gf_boolean_t *ports, uint32_t ceiling) { int ret = -1; + int i = 0; + + for (i = 0; i < GF_PORT_MAX; i++) { + *(ports + i) = _gf_false; + } + #if defined GF_LINUX_HOST_OS char *ports_info = NULL; char *tmp = NULL; @@ -3005,7 +3011,11 @@ gf_process_reserved_ports (gf_boolean_t *ports, uint32_t ceiling) out: GF_FREE (ports_info); + +#else /* FIXME: Non Linux Host */ + ret = 0; #endif /* GF_LINUX_HOST_OS */ + return ret; } -- cgit