From 1900ce2e2767c4653fa5db3ae88a33e2f8fca0fd Mon Sep 17 00:00:00 2001 From: bug1 Date: Sun, 22 Feb 2004 02:58:57 +0000 Subject: Return 1 upon failure git-svn-id: svn://busybox.net/trunk/busybox@8533 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- coreutils/md5_sha1_sum.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c index b5e29cd72..83f6da180 100644 --- a/coreutils/md5_sha1_sum.c +++ b/coreutils/md5_sha1_sum.c @@ -149,6 +149,7 @@ extern int hash_files(int argc, char **argv, const uint8_t hash_algo) if (!(flags & FLAG_SILENT)) printf("%s: FAILED\n", filename_ptr); count_failed++; + return_value = EXIT_FAILURE; } /* possible free(NULL) */ free(hash_value); @@ -178,7 +179,7 @@ extern int hash_files(int argc, char **argv, const uint8_t hash_algo) hash_value = hash_file(file_ptr, hash_algo); if (hash_value == NULL) { - return_value++; + return_value = EXIT_FAILURE; } else { printf("%s %s\n", hash_value, file_ptr); free(hash_value); -- cgit v1.2.3-55-g6feb