summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2015-04-16 12:11:24 +0530
committerVijay Bellur <vbellur@redhat.com>2015-04-17 17:32:34 +0000
commitd18c68fbe1608a824bf50ffa3315d7acd5054a15 (patch)
treee987837f9d29bf735d94dad8fd3f6a412b209665 /cli
parenta3578deaa5886ddac6196ef3dc5ad78d97ba1692 (diff)
geo-rep/cli : Fix geo-rep cli crash
Fixes crash when "gluster vol geo-rep <master-vol> status" is run because of incorrect argc and index comparison. Change-Id: Id14d63d020ad9c5951b54ef50e7c140e58d9d7a6 BUG: 1212063 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/10264 Reviewed-by: Aravinda VK <avishwan@redhat.com> Tested-by: NetBSD Build System Reviewed-by: Avra Sengupta <asengupt@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c
index 511b45b54ef..525ec4bab72 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -410,7 +410,7 @@ parse_cmdline (int argc, char *argv[], struct cli_state *state)
state->ctx->secure_mgmt = 1;
}
- if (state->argc >= GEO_REP_CMD_CONFIG_INDEX &&
+ if (state->argc > GEO_REP_CMD_CONFIG_INDEX &&
strtail (state->argv[GEO_REP_CMD_INDEX], "geo") &&
strtail (state->argv[GEO_REP_CMD_CONFIG_INDEX], "co"))
geo_rep_config = _gf_true;