mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
fix getopt_long error check
This commit is contained in:
parent
8df67fbf36
commit
d2aef510a4
@ -1684,7 +1684,7 @@ static int _process_switches(int *argc, char ***argv)
|
|||||||
optind = OPTIND_INIT;
|
optind = OPTIND_INIT;
|
||||||
while ((ind = -1, c = GETOPTLONG_FN(*argc, *argv, "cCfGj:m:Mno:ru:Uv",
|
while ((ind = -1, c = GETOPTLONG_FN(*argc, *argv, "cCfGj:m:Mno:ru:Uv",
|
||||||
long_options, NULL)) != -1) {
|
long_options, NULL)) != -1) {
|
||||||
if (ind == -1 || ind == ':' || ind == '?')
|
if (c == ':' || c == '?')
|
||||||
return 0;
|
return 0;
|
||||||
if (c == 'c' || c == 'C' || ind == COLS_ARG)
|
if (c == 'c' || c == 'C' || ind == COLS_ARG)
|
||||||
_switches[COLS_ARG]++;
|
_switches[COLS_ARG]++;
|
||||||
|
Loading…
Reference in New Issue
Block a user