summaryrefslogtreecommitdiffstats
path: root/usr.bin/patch/inp.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1996-07-01 20:40:07 +0000
committerderaadt <deraadt@openbsd.org>1996-07-01 20:40:07 +0000
commit4c36d7f787f72ccb23c6cb7317bc3f95a7c45fa3 (patch)
treea54c814335cfcaddb3eb5625141a1e90833cd1fd /usr.bin/patch/inp.c
parentbuild kernel automatically (diff)
downloadwireguard-openbsd-4c36d7f787f72ccb23c6cb7317bc3f95a7c45fa3.tar.xz
wireguard-openbsd-4c36d7f787f72ccb23c6cb7317bc3f95a7c45fa3.zip
undo mktemp cleanup until i get it right
Diffstat (limited to 'usr.bin/patch/inp.c')
-rw-r--r--usr.bin/patch/inp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/patch/inp.c b/usr.bin/patch/inp.c
index 34a93b590a6..86c3b3759a6 100644
--- a/usr.bin/patch/inp.c
+++ b/usr.bin/patch/inp.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: inp.c,v 1.3 1996/06/25 23:06:38 deraadt Exp $ */
+/* $OpenBSD: inp.c,v 1.4 1996/07/01 20:40:07 deraadt Exp $ */
#ifndef lint
-static char rcsid[] = "$OpenBSD: inp.c,v 1.3 1996/06/25 23:06:38 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: inp.c,v 1.4 1996/07/01 20:40:07 deraadt Exp $";
#endif /* not lint */
#include "EXTERN.h"
@@ -241,6 +241,7 @@ char *filename;
using_plan_a = FALSE;
if ((ifp = fopen(filename, "r")) == Nullfp)
pfatal2("can't open file %s", filename);
+ (void) unlink(TMPINNAME);
if ((tifd = open(TMPINNAME, O_EXCL|O_CREAT|O_WRONLY, 0666)) < 0)
pfatal2("can't open file %s", TMPINNAME);
while (fgets(buf, sizeof buf, ifp) != Nullch) {