summaryrefslogtreecommitdiff
path: root/usr.bin/patch/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/patch/util.c')
-rw-r--r--usr.bin/patch/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/patch/util.c b/usr.bin/patch/util.c
index f079b5149c5..c94a3f2beb1 100644
--- a/usr.bin/patch/util.c
+++ b/usr.bin/patch/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.45 2019/12/02 22:17:32 jca Exp $ */
+/* $OpenBSD: util.c,v 1.46 2021/10/24 21:24:17 deraadt Exp $ */
/*
* patch - a program to apply diffs to original files
@@ -157,7 +157,7 @@ copy_file(const char *from, const char *to)
tofd = open(to, O_CREAT|O_TRUNC|O_WRONLY, 0666);
if (tofd == -1)
return -1;
- fromfd = open(from, O_RDONLY, 0);
+ fromfd = open(from, O_RDONLY);
if (fromfd == -1)
pfatal("internal error, can't reopen %s", from);
while ((i = read(fromfd, buf, bufsz)) > 0)