]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(main): Use getopt where it suffices, not getopt_long.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 21 Sep 2004 22:07:51 +0000 (22:07 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 21 Sep 2004 22:07:51 +0000 (22:07 +0000)
src/cksum.c
src/dd.c

index d4fdd2a3edde98df9be61b6d26720aafde9f9ace..6cf47619d49327c1093fd01d8daae2a24aaae1ab 100644 (file)
@@ -298,12 +298,11 @@ main (int argc, char **argv)
 
   parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE, VERSION,
                      usage, AUTHORS, (char const *) NULL);
+  if (getopt (argc, argv, "") != -1)
+    usage (EXIT_FAILURE);
 
   have_read_stdin = false;
 
-  if (getopt_long (argc, argv, "", NULL, NULL) != -1)
-    usage (EXIT_FAILURE);
-
   if (optind == argc)
     ok = cksum ("-", false);
   else
index 4cbb58d98860cee92a85f6493a2ab292a2d320b5..879a88e331e48cdadc710618261cee3dd1f78195 100644 (file)
--- a/src/dd.c
+++ b/src/dd.c
@@ -1360,7 +1360,7 @@ main (int argc, char **argv)
 
   parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE, VERSION,
                      usage, AUTHORS, (char const *) NULL);
-  if (getopt_long (argc, argv, "", NULL, NULL) != -1)
+  if (getopt (argc, argv, "") != -1)
     usage (EXIT_FAILURE);
 
   /* Don't close stdout on exit from here on.  */