summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editors/sed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/sed.c b/editors/sed.c
index 968d0d2..750f41a 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -1191,7 +1191,7 @@ extern int sed_main(int argc, char **argv)
nonstdout=bb_wfopen(outname,"w");
/* Set permissions of output file */
fstat(fileno(file),&statbuf);
- fchmod(fileno(file),statbuf.st_mode);
+ fchmod(fileno(nonstdout),statbuf.st_mode);
atexit(cleanup_outname);
}
process_file(file);