aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/dd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c
index f1e63fd8b..8173d403d 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -301,9 +301,12 @@ int dd_main(int argc UNUSED_PARAM, char **argv)
if (ftruncate(ofd, seek * obs) < 0) {
struct stat st;
- if (fstat(ofd, &st) < 0 || S_ISREG(st.st_mode) ||
- S_ISDIR(st.st_mode))
+ if (fstat(ofd, &st) < 0
+ || S_ISREG(st.st_mode)
+ || S_ISDIR(st.st_mode)
+ ) {
goto die_outfile;
+ }
}
}
} else {