diff options
author | pfg <pfg@FreeBSD.org> | 2015-01-27 19:46:19 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2015-01-27 19:46:19 +0000 |
commit | b7d476d8d9dc6c9f6fc4e8c2552562fe1aaf8fd2 (patch) | |
tree | a4eef7af6b688a3e3e27813c131bd2f3a58fbfc2 /usr.bin/sed | |
parent | 1ff092273d69bc3cb7fa22abfb7238f6e4822369 (diff) | |
download | FreeBSD-src-b7d476d8d9dc6c9f6fc4e8c2552562fe1aaf8fd2.zip FreeBSD-src-b7d476d8d9dc6c9f6fc4e8c2552562fe1aaf8fd2.tar.gz |
sed: fix pasto from previous r277802.
MFC after: 3 days
Diffstat (limited to 'usr.bin/sed')
-rw-r--r-- | usr.bin/sed/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/sed/main.c b/usr.bin/sed/main.c index dafb0bd..36a3299 100644 --- a/usr.bin/sed/main.c +++ b/usr.bin/sed/main.c @@ -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; |