summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-01-21 23:20:16 +0000
committerJim Meyering <jim@meyering.net>2004-01-21 23:20:16 +0000
commitc399132b6eb0263d1ca79f1ced201b43b2886424 (patch)
treeafb2ee187a6032c88560b25b13cbbbaa7cdd5ebe /src
parent0c3d855eaec1f8fbbe4fb856b3edcbf43234ff3e (diff)
downloadcoreutils-c399132b6eb0263d1ca79f1ced201b43b2886424.tar.xz
(usage): Use EXIT_SUCCESS, not 0, for clarity.
(main): Don't assume EXIT_FAILURE == 1, as POSIX doesn't require it.
Diffstat (limited to 'src')
-rw-r--r--src/ls.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ls.c b/src/ls.c
index 00bb1fa9f..8a0928647 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -1,5 +1,5 @@
/* `dir', `vdir' and `ls' directory listing programs for GNU.
- Copyright (C) 85, 88, 90, 91, 1995-2003 Free Software Foundation, Inc.
+ Copyright (C) 85, 88, 90, 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
@@ -662,7 +662,7 @@ static char const *long_time_format[2] =
N_("%b %e %H:%M")
};
-/* The exit status to use if we don't get any fatal errors. */
+/* Nonzero if a non-fatal error has occurred. */
static int exit_status;
@@ -1210,7 +1210,7 @@ main (int argc, char **argv)
hash_free (active_dir_set);
}
- exit (exit_status);
+ exit (exit_status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
/* Set all the option flags according to the switches specified.
@@ -3903,7 +3903,7 @@ calculate_columns (bool by_columns)
void
usage (int status)
{
- if (status != 0)
+ if (status != EXIT_SUCCESS)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else