1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

fix getopt_long error check

This commit is contained in:
Alasdair Kergon 2006-08-10 20:53:21 +00:00
parent 8df67fbf36
commit d2aef510a4

View File

@ -1684,7 +1684,7 @@ static int _process_switches(int *argc, char ***argv)
optind = OPTIND_INIT;
while ((ind = -1, c = GETOPTLONG_FN(*argc, *argv, "cCfGj:m:Mno:ru:Uv",
long_options, NULL)) != -1) {
if (ind == -1 || ind == ':' || ind == '?')
if (c == ':' || c == '?')
return 0;
if (c == 'c' || c == 'C' || ind == COLS_ARG)
_switches[COLS_ARG]++;