aboutsummaryrefslogtreecommitdiff
path: root/coreutils/md5sum.c
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2000-12-01 02:55:13 +0000
committerMatt Kraai <kraai@debian.org>2000-12-01 02:55:13 +0000
commit3e856ce428cabaf6c8d99a2374a1f9a4a05db5f0 (patch)
tree013a1e7752113314831ad7d51854ce8dc9e0918b /coreutils/md5sum.c
parentb558e76eb1ba173ce3501c3e13fb80f426a7faac (diff)
downloadbusybox-w32-3e856ce428cabaf6c8d99a2374a1f9a4a05db5f0.tar.gz
busybox-w32-3e856ce428cabaf6c8d99a2374a1f9a4a05db5f0.tar.bz2
busybox-w32-3e856ce428cabaf6c8d99a2374a1f9a4a05db5f0.zip
Stop using TRUE and FALSE for exit status.
Diffstat (limited to 'coreutils/md5sum.c')
-rw-r--r--coreutils/md5sum.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/coreutils/md5sum.c b/coreutils/md5sum.c
index 21570de93..30b882ab5 100644
--- a/coreutils/md5sum.c
+++ b/coreutils/md5sum.c
@@ -902,22 +902,22 @@ int md5sum_main(int argc,
902 902
903 if (file_type_specified && do_check) { 903 if (file_type_specified && do_check) {
904 errorMsg("the -b and -t options are meaningless when verifying checksums\n"); 904 errorMsg("the -b and -t options are meaningless when verifying checksums\n");
905 exit FALSE; 905 return EXIT_FAILURE;
906 } 906 }
907 907
908 if (n_strings > 0 && do_check) { 908 if (n_strings > 0 && do_check) {
909 errorMsg("the -g and -c options are mutually exclusive\n"); 909 errorMsg("the -g and -c options are mutually exclusive\n");
910 exit FALSE; 910 return EXIT_FAILURE;
911 } 911 }
912 912
913 if (status_only && !do_check) { 913 if (status_only && !do_check) {
914 errorMsg("the -s option is meaningful only when verifying checksums\n"); 914 errorMsg("the -s option is meaningful only when verifying checksums\n");
915 exit FALSE; 915 return EXIT_FAILURE;
916 } 916 }
917 917
918 if (warn && !do_check) { 918 if (warn && !do_check) {
919 errorMsg("the -w option is meaningful only when verifying checksums\n"); 919 errorMsg("the -w option is meaningful only when verifying checksums\n");
920 exit FALSE; 920 return EXIT_FAILURE;
921 } 921 }
922 922
923 if (n_strings > 0) { 923 if (n_strings > 0) {
@@ -925,7 +925,7 @@ int md5sum_main(int argc,
925 925
926 if (optind < argc) { 926 if (optind < argc) {
927 errorMsg("no files may be specified when using -g\n"); 927 errorMsg("no files may be specified when using -g\n");
928 exit FALSE; 928 return EXIT_FAILURE;
929 } 929 }
930 for (i = 0; i < n_strings; ++i) { 930 for (i = 0; i < n_strings; ++i) {
931 size_t cnt; 931 size_t cnt;
@@ -992,13 +992,16 @@ int md5sum_main(int argc,
992 992
993 if (fclose (stdout) == EOF) { 993 if (fclose (stdout) == EOF) {
994 errorMsg("write error\n"); 994 errorMsg("write error\n");
995 exit FALSE; 995 return EXIT_FAILURE;
996 } 996 }
997 997
998 if (have_read_stdin && fclose (stdin) == EOF) { 998 if (have_read_stdin && fclose (stdin) == EOF) {
999 errorMsg("standard input\n"); 999 errorMsg("standard input\n");
1000 exit FALSE; 1000 return EXIT_FAILURE;
1001 } 1001 }
1002 1002
1003 exit (err == 0 ? TRUE : FALSE); 1003 if (err == 0)
1004 return EXIT_SUCCESS;
1005 else
1006 return EXIT_FAILURE;
1004} 1007}