summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-pmap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-pmap.c b/xlators/mgmt/glusterd/src/glusterd-pmap.c
index 46f0330d9e2..cbc800595ab 100644
--- a/xlators/mgmt/glusterd/src/glusterd-pmap.c
+++ b/xlators/mgmt/glusterd/src/glusterd-pmap.c
@@ -62,7 +62,7 @@ pmap_registry_new (xlator_t *this)
pmap->base_port = pmap->last_alloc =
((glusterd_conf_t *)(this->private))->base_port;
- for (i = pmap->base_port; i < 65536; i++) {
+ for (i = pmap->base_port; i <= GF_PORT_MAX; i++) {
if (pmap_port_isfree (i))
pmap->ports[i].type = GF_PMAP_PORT_FREE;
else
@@ -162,7 +162,7 @@ pmap_registry_search_by_port (xlator_t *this, int port)
struct pmap_registry *pmap = NULL;
char *brickname = NULL;
- if (port > 65535)
+ if (port > GF_PORT_MAX)
goto out;
pmap = pmap_registry_get (this);
@@ -184,7 +184,7 @@ pmap_registry_alloc (xlator_t *this)
pmap = pmap_registry_get (this);
- for (p = pmap->last_alloc; p < 65535; p++) {
+ for (p = pmap->last_alloc; p <= GF_PORT_MAX; p++) {
/* GF_PMAP_PORT_FOREIGN may be freed up ? */
if ((pmap->ports[p].type == GF_PMAP_PORT_FREE) ||
(pmap->ports[p].type == GF_PMAP_PORT_FOREIGN)) {
@@ -212,7 +212,7 @@ pmap_registry_bind (xlator_t *this, int port, const char *brickname,
pmap = pmap_registry_get (this);
- if (port > 65535)
+ if (port > GF_PORT_MAX)
goto out;
p = port;
@@ -246,7 +246,7 @@ pmap_registry_remove (xlator_t *this, int port, const char *brickname,
goto out;
if (port) {
- if (port > 65535)
+ if (port > GF_PORT_MAX)
goto out;
p = port;