mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
(usage): Use EXIT_SUCCESS, not 0, for clarity.
(usage): Don't bother normalizing exit status since the arg is already the correct exit status now.
This commit is contained in:
1 parent
88a8689c36
commit
69e2df952e
2 files changed
+6
-6
No files matched your search
+3
-3
@@ -1,5 +1,5 @@
|
||||
/* unexpand - convert spaces to tabs
|
||||
Copyright (C) 89, 91, 1995-2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 89, 91, 1995-2004 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -369,7 +369,7 @@ unexpand (void)
|
||||
void
|
||||
usage (int status)
|
||||
{
|
||||
if (status != 0)
|
||||
if (status != EXIT_SUCCESS)
|
||||
fprintf (stderr, _("Try `%s --help' for more information.\n"),
|
||||
program_name);
|
||||
else
|
||||
@@ -396,7 +396,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
|
||||
fputs (VERSION_OPTION_DESCRIPTION, stdout);
|
||||
printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
|
||||
}
|
||||
exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
|
||||
exit (status);
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/* uniq -- remove duplicate lines from a sorted file
|
||||
Copyright (C) 86, 91, 1995-2003, Free Software Foundation, Inc.
|
||||
Copyright (C) 86, 91, 1995-2004 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -126,7 +126,7 @@ static struct option const longopts[] =
|
||||
void
|
||||
usage (int status)
|
||||
{
|
||||
if (status != 0)
|
||||
if (status != EXIT_SUCCESS)
|
||||
fprintf (stderr, _("Try `%s --help' for more information.\n"),
|
||||
program_name);
|
||||
else
|
||||
@@ -168,7 +168,7 @@ Fields are skipped before chars.\n\
|
||||
"), stdout);
|
||||
printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
|
||||
}
|
||||
exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
|
||||
exit (status);
|
||||
}
|
||||
|
||||
/* Convert OPT to size_t, reporting an error using MSGID if it does
|
||||
|
||||
Reference in new issue
Block a user