aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/diff.c2
-rw-r--r--editors/sed.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/editors/diff.c b/editors/diff.c
index b324feaa5..8911859cd 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -773,7 +773,7 @@ static int diffreg(char *file[2])
773 fd = fd_tmp; 773 fd = fd_tmp;
774 xlseek(fd, 0, SEEK_SET); 774 xlseek(fd, 0, SEEK_SET);
775 } 775 }
776 fp[i] = fdopen(fd, "r"); 776 fp[i] = xfdopen_for_read(fd);
777 } 777 }
778 778
779 setup_common_bufsiz(); 779 setup_common_bufsiz();
diff --git a/editors/sed.c b/editors/sed.c
index 107e664a0..204417108 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -257,7 +257,12 @@ static FILE *sed_xfopen_w(const char *fname)
257 257
258static void cleanup_outname(void) 258static void cleanup_outname(void)
259{ 259{
260 if (G.outname) unlink(G.outname); 260 if (G.outname) {
261#if ENABLE_PLATFORM_MINGW32
262 fclose(G.nonstdout);
263#endif
264 unlink(G.outname);
265 }
261} 266}
262 267
263/* strcpy, replacing "\from" with 'to'. If to is NUL, replacing "\any" with 'any' */ 268/* strcpy, replacing "\from" with 'to'. If to is NUL, replacing "\any" with 'any' */