summaryrefslogtreecommitdiff
path: root/src/sum.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-03-24 14:58:01 +0000
committerJim Meyering <jim@meyering.net>1996-03-24 14:58:01 +0000
commit47f70113d4342682a6408f85337676f1ccb7e8fe (patch)
treee0a69d9a12ac5b336364cc0191f2390d5061fd50 /src/sum.c
parent2fa0c16e5e11ff23fb4e57246a21d9d0ef731caa (diff)
downloadcoreutils-47f70113d4342682a6408f85337676f1ccb7e8fe.tar.xz
Exit with status EXIT_SUCCESS or EXIT_FAILURE, rather than 0 or 1.
This doesn't change `error (1' calls.
Diffstat (limited to 'src/sum.c')
-rw-r--r--src/sum.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sum.c b/src/sum.c
index 7995d6590..267b1b1be 100644
--- a/src/sum.c
+++ b/src/sum.c
@@ -75,7 +75,7 @@ Print checksum and block counts for each FILE.\n\
With no FILE, or when FILE is -, read standard input.\n\
"));
}
- exit (status);
+ exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
/* Calculate and print the rotated checksum and the size in 1K blocks
@@ -235,7 +235,7 @@ main (int argc, char **argv)
if (show_version)
{
printf ("sum - %s\n", PACKAGE_VERSION);
- exit (0);
+ exit (EXIT_SUCCESS);
}
if (show_help)
@@ -254,6 +254,6 @@ main (int argc, char **argv)
if (have_read_stdin && fclose (stdin) == EOF)
error (1, errno, "-");
- exit (errors);
+ exit (errors == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}