mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
(main): Use getopt where it suffices, not getopt_long.
This commit is contained in:
1 parent
aa1ed28185
commit
3456364b8c
2 files changed
+3
-4
No files matched your search
+2
-3
@@ -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
|
||||
|
||||
@@ -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. */
|
||||
|
||||
Reference in new issue
Block a user