svn commit: r277811 - head/usr.bin/sed
Pedro F. Giffuni
pfg at FreeBSD.org
Tue Jan 27 19:46:20 UTC 2015
Author: pfg
Date: Tue Jan 27 19:46:19 2015
New Revision: 277811
URL: https://svnweb.freebsd.org/changeset/base/277811
Log:
sed: fix pasto from previous r277802.
MFC after: 3 days
Modified:
head/usr.bin/sed/main.c
Modified: head/usr.bin/sed/main.c
==============================================================================
--- head/usr.bin/sed/main.c Tue Jan 27 19:41:24 2015 (r277810)
+++ head/usr.bin/sed/main.c Tue Jan 27 19:46:19 2015 (r277811)
@@ -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;
More information about the svn-src-all
mailing list