diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2004-02-22 05:58:57 +0300 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2004-02-22 05:58:57 +0300 |
commit | 6db8c22d07d3f70ea7c3c9102879152cc9e32a84 (patch) | |
tree | ee1217e5645096f4bcb39b6483455b4e23641517 /coreutils | |
parent | f1c4b11b2415ca495f33be30c889da89e3f1b2dd (diff) |
Return 1 upon failure
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/md5_sha1_sum.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |