mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-06 20:44:02 +03:00
(main): Use EXIT_SUCCESS rather than 0.
Fail when checking (-c) with more than one file argument, rather than simply ignoring the extra arguments.
This commit is contained in:
@@ -2242,9 +2242,14 @@ but lacks following character offset"));
|
||||
|
||||
if (checkonly)
|
||||
{
|
||||
if (nfiles > 1)
|
||||
error (SORT_FAILURE, 0,
|
||||
_("too many arguments; with -c, there may be at most
|
||||
one file argument"));
|
||||
|
||||
/* POSIX requires that sort return 1 IFF invoked with -c and the
|
||||
input is not properly sorted. */
|
||||
exit (check (files, nfiles) == 0 ? 0 : 1);
|
||||
exit (check (files, nfiles) == 0 ? EXIT_SUCCESS : 1);
|
||||
}
|
||||
|
||||
if (!STREQ (outfile, "-"))
|
||||
|
||||
Reference in New Issue
Block a user