summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-01-21 22:55:51 +0000
committerJim Meyering <jim@meyering.net>2004-01-21 22:55:51 +0000
commitb8824abce229cd6b2266a23eaeef2d3b49cf09d1 (patch)
tree782f4c30e488e026d3684e70c36f67437a2d4071 /src
parentb74d9dcfade2452b986a89f3932514d8c47654ac (diff)
downloadcoreutils-b8824abce229cd6b2266a23eaeef2d3b49cf09d1.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/df.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/df.c b/src/df.c
index 14a83bc81..e348f3253 100644
--- a/src/df.c
+++ b/src/df.c
@@ -1,5 +1,5 @@
/* df - summarize free disk space
- Copyright (C) 91, 1995-2003 Free Software Foundation, Inc.
+ Copyright (C) 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
@@ -719,7 +719,7 @@ add_excluded_fs_type (const char *fstype)
void
usage (int status)
{
- if (status != 0)
+ if (status != EXIT_SUCCESS)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
@@ -918,7 +918,7 @@ main (int argc, char **argv)
Fail if df was invoked with no file name arguments;
Otherwise, merely give a warning and proceed. */
const char *warning = (optind < argc ? _("Warning: ") : "");
- int status = (optind < argc ? 0 : 1);
+ int status = (optind < argc ? 0 : EXIT_FAILURE);
error (status, errno,
_("%scannot read table of mounted filesystems"), warning);
}
@@ -946,5 +946,5 @@ main (int argc, char **argv)
show_all_entries ();
}
- exit (exit_status);
+ exit (exit_status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}