From d2aef510a4efabd0bc5138504f5d3b20c728de68 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Thu, 10 Aug 2006 20:53:21 +0000 Subject: [PATCH] fix getopt_long error check --- tools/dmsetup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/dmsetup.c b/tools/dmsetup.c index d9dab9d54..2b0008e54 100644 --- a/tools/dmsetup.c +++ b/tools/dmsetup.c @@ -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]++; -- 2.43.5