summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2011-07-23 12:14:48 +0200
committerVijay Bellur <vijay@gluster.com>2011-09-12 06:22:17 -0700
commit3d67836dba4f5a94f33e9ac13b7ebbf01344ac37 (patch)
treea204a838ec38c194fc3fbe8bb39d85346bfdf306 /cli
parentd58382182ee53fcc83ec04f211c000a5a4db9a0b (diff)
cli: fix option parsing bug which implied that only a single option can be used
Change-Id: I89467d00030f4714568ef63650ecef0aef1bf753 BUG: 3242 Reviewed-on: http://review.gluster.com/94 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c
index 1d500c1ab..50a6c1853 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -375,6 +375,8 @@ parse_cmdline (int argc, char *argv[], struct cli_state *state)
for (j = i; j < state->argc - 1; j++)
state->argv[j] = state->argv[j + 1];
state->argc--;
+ /* argv shifted, next check should be at i again */
+ i--;
}
}