summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorPrasanna Kumar Kalever <prasanna.kalever@redhat.com>2016-04-30 14:37:40 +0530
committerJeff Darcy <jdarcy@redhat.com>2016-05-02 10:45:33 -0700
commita85e75a111941c50ba1996d70328fe686a34ba07 (patch)
tree2c49053dc2b06c096816b3257af0e882f59ef7de /libglusterfs
parent45f6b416be0a8daeca9752910a332201bc17d851 (diff)
rpc: fix gf_process_reserved_ports
this patch also does minor code cleanups. Backport of: > 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> Change-Id: Ia53ba724f6d31cb2fc609786e31a1b676f55fe01 BUG: 1331941 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> Reviewed-on: http://review.gluster.org/14128 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
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 716f002..40d9b63 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -2797,6 +2797,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;
@@ -2822,7 +2828,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;
}