summaryrefslogtreecommitdiff
path: root/usr.bin/patch/inp.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-11 01:12:11 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-11 01:12:11 +0000
commitdf8ebf4c4a153005ea56888d82e05288c597b4dc (patch)
treec0eb870a47c4f73e3880ed05eb2ca1d61294ea89 /usr.bin/patch/inp.c
parent4a35cd787d4211704bc33e641f746562a95af113 (diff)
creat() -> open equiv; from Frederic Nowak
Diffstat (limited to 'usr.bin/patch/inp.c')
-rw-r--r--usr.bin/patch/inp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/patch/inp.c b/usr.bin/patch/inp.c
index 99194a4ac14..6606ede551f 100644
--- a/usr.bin/patch/inp.c
+++ b/usr.bin/patch/inp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inp.c,v 1.44 2015/07/26 14:32:19 millert Exp $ */
+/* $OpenBSD: inp.c,v 1.45 2015/11/11 01:12:10 deraadt Exp $ */
/*
* patch - a program to apply diffs to original files
@@ -159,7 +159,7 @@ plan_a(const char *filename)
if (check_only)
return true;
makedirs(filename, true);
- close(creat(filename, 0666));
+ close(open(filename, O_CREAT | O_TRUNC | O_WRONLY, 0666));
statfailed = stat(filename, &filestat);
}
if (statfailed)