summaryrefslogtreecommitdiffstats
path: root/usr.bin/patch/inp.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/patch/inp.c')
-rw-r--r--usr.bin/patch/inp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/patch/inp.c b/usr.bin/patch/inp.c
index e7661358124..34a93b590a6 100644
--- a/usr.bin/patch/inp.c
+++ b/usr.bin/patch/inp.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: inp.c,v 1.2 1996/06/10 11:21:28 niklas Exp $ */
+/* $OpenBSD: inp.c,v 1.3 1996/06/25 23:06:38 deraadt Exp $ */
#ifndef lint
-static char rcsid[] = "$OpenBSD: inp.c,v 1.2 1996/06/10 11:21:28 niklas Exp $";
+static char rcsid[] = "$OpenBSD: inp.c,v 1.3 1996/06/25 23:06:38 deraadt Exp $";
#endif /* not lint */
#include "EXTERN.h"
@@ -241,7 +241,7 @@ char *filename;
using_plan_a = FALSE;
if ((ifp = fopen(filename, "r")) == Nullfp)
pfatal2("can't open file %s", filename);
- if ((tifd = creat(TMPINNAME, 0666)) < 0)
+ 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) {
if (revision != Nullch && !found_revision && rev_in_string(buf))