aboutsummaryrefslogtreecommitdiff
path: root/coreutils/dd.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/dd.c')
-rw-r--r--coreutils/dd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c
index 11508614f..cd97b24ee 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -106,9 +106,7 @@ int dd_main(int argc, char **argv)
buf = xmalloc(bs);
if (infile != NULL) {
- if ((ifd = open(infile, O_RDONLY)) < 0) {
- bb_perror_msg_and_die("%s", infile);
- }
+ ifd = bb_xopen(infile, O_RDONLY);
} else {
ifd = STDIN_FILENO;
infile = bb_msg_standard_input;