]> sourceware.org Git - dm.git/commitdiff
fix getopt_long error check
authorAlasdair Kergon <agk@redhat.com>
Thu, 10 Aug 2006 20:53:21 +0000 (20:53 +0000)
committerAlasdair Kergon <agk@redhat.com>
Thu, 10 Aug 2006 20:53:21 +0000 (20:53 +0000)
dmsetup/dmsetup.c

index d9dab9d54f8b5ad025dfb84895048ba9f61c63c1..2b0008e5474ece273e4324b03ef375f5d0f6b7dd 100644 (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]++;
This page took 0.029264 seconds and 5 git commands to generate.