summaryrefslogtreecommitdiffhomepage
path: root/coreutils/dos2unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/dos2unix.c')
-rw-r--r--coreutils/dos2unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c
index 309cbc3b8..baf879e54 100644
--- a/coreutils/dos2unix.c
+++ b/coreutils/dos2unix.c
@@ -42,10 +42,10 @@ static void convert(char *fn, int conv_type)
i = mkstemp(temp_fn);
if (i == -1
|| fchmod(i, st.st_mode) == -1
- || !(out = fdopen(i, "w+"))
) {
bb_simple_perror_msg_and_die(temp_fn);
}
+ out = xfdopen_for_write(i);
}
while ((i = fgetc(in)) != EOF) {