summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorPrasanna Kumar Kalever <prasanna.kalever@redhat.com>2016-04-26 21:42:23 +0530
committerJeff Darcy <jdarcy@redhat.com>2016-04-27 08:05:08 -0700
commit88a386b9c87072787a3b712073cbf19a74b0bd20 (patch)
treee45be9ec41357e4017785d2b6639d89253b91a8b /libglusterfs
parent49796290c9772ce49e5a1666cc2f3cc875e59e49 (diff)
rpc: fix gf_process_reserved_ports
this patch also does minor code cleanups. Change-Id: I0d005bd0f9baaaae498aa1df4faa6fcb65fa7a6e BUG: 1198849 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> Reviewed-on: http://review.gluster.org/13997 Tested-by: Prasanna Kumar Kalever <pkalever@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/common-utils.c10
1 files changed, 10 insertions, 0 deletions
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;
}