(longopts): Don't hard-code `2' here.
authorJim Meyering <jim@meyering.net>
Tue, 11 Mar 2003 20:48:36 +0000 (20:48 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 11 Mar 2003 20:48:36 +0000 (20:48 +0000)
Instead, just specify `&verbose', and ...
(main): ... remove the `case 2:' block for --verbose.

src/split.c

index 9572e4e..793f035 100644 (file)
@@ -79,7 +79,7 @@ static struct option const longopts[] =
   {"lines", required_argument, NULL, 'l'},
   {"line-bytes", required_argument, NULL, 'C'},
   {"suffix-length", required_argument, NULL, 'a'},
-  {"verbose", no_argument, NULL, 2},
+  {"verbose", no_argument, &verbose, 0},
   {GETOPT_HELP_OPTION_DECL},
   {GETOPT_VERSION_OPTION_DECL},
   {NULL, 0, NULL, 0}
@@ -456,10 +456,6 @@ main (int argc, char **argv)
          accum = accum * 10 + c - '0';
          break;
 
-       case 2:
-         verbose = 1;
-         break;
-
        case_GETOPT_HELP_CHAR;
 
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);