sed: fix pasto from previous r277802.

MFC after:	3 days
This commit is contained in:
Pedro F. Giffuni 2015-01-27 19:46:19 +00:00
parent 9049b13f8f
commit 76c76d54f8

View File

@ -409,10 +409,10 @@ mf_fgets(SPACE *sp, enum e_spflag spflag)
if (len >= (ssize_t)sizeof(tmpfname))
errx(1, "%s: name too long", fname);
unlink(tmpfname);
if ((outfile = fopen(tmpfname, "w")) == NULL)
err(1, "%s", fname);
if (outfile != NULL && outfile != stdout)
fclose(outfile);
if ((outfile = fopen(tmpfname, "w")) == NULL)
err(1, "%s", fname);
fchown(fileno(outfile), sb.st_uid, sb.st_gid);
fchmod(fileno(outfile), sb.st_mode & ALLPERMS);
outfname = tmpfname;