aboutsummaryrefslogtreecommitdiff
path: root/coreutils/md5_sha1_sum.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/md5_sha1_sum.c')
-rw-r--r--coreutils/md5_sha1_sum.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c
index 417e90b00..a3818d519 100644
--- a/coreutils/md5_sha1_sum.c
+++ b/coreutils/md5_sha1_sum.c
@@ -38,9 +38,8 @@ static uint8_t *hash_file(const char *filename, hash_algo_t hash_algo)
src_fd = STDIN_FILENO;
if (NOT_LONE_DASH(filename)) {
- src_fd = open(filename, O_RDONLY);
+ src_fd = open_or_warn(filename, O_RDONLY);
if (src_fd < 0) {
- bb_perror_msg("%s", filename);
return NULL;
}
}