summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-01-21 23:30:09 +0000
committerJim Meyering <jim@meyering.net>2004-01-21 23:30:09 +0000
commitd2e7cd3b7ab05092ce3a6df36241134dbb426a7a (patch)
treeba48620f2e65fb4198ae017156de1f00da0229ed /src
parent11f893d2de920b4d0ebb40a65f0417044d380ca8 (diff)
downloadcoreutils-d2e7cd3b7ab05092ce3a6df36241134dbb426a7a.tar.xz
(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. (main): Exit with status 1, not 2, on errors detected by nl proper.
Diffstat (limited to 'src')
-rw-r--r--src/nl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nl.c b/src/nl.c
index 7fa88120c..cc4865ef4 100644
--- a/src/nl.c
+++ b/src/nl.c
@@ -1,5 +1,5 @@
/* nl -- number lines of files
- Copyright (C) 89, 92, 1995-2003 Free Software Foundation, Inc.
+ Copyright (C) 89, 92, 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
@@ -168,7 +168,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
@@ -226,7 +226,7 @@ FORMAT is one of:\n\
"), stdout);
printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
}
- exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
+ exit (status);
}
/* Build the printf format string, based on `lineno_format'. */
@@ -606,7 +606,7 @@ main (int argc, char **argv)
}
if (fail)
- usage (2);
+ usage (EXIT_FAILURE);
/* Initialize the section delimiters. */
len = strlen (section_del);