From 7aa3693f92cba9049adc10c72406f4b7253dfabe 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 --- dmsetup/dmsetup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmsetup/dmsetup.c b/dmsetup/dmsetup.c index d9dab9d..2b0008e 100644 --- a/dmsetup/dmsetup.c +++ b/dmsetup/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