summaryrefslogtreecommitdiff
path: root/app/xpr/xpr.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2021-10-25 09:30:34 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2021-10-25 09:30:34 +0000
commit6cb581d1da73c851a6a2ad535f33a9745dc07217 (patch)
tree39ffc9a64f6e34ee3c0536d207a40ec120ad85f7 /app/xpr/xpr.c
parente46ac0341c6f0ef544a483ae86a36a04bab84052 (diff)
Remove 3rd argument to open() when flags don't include O_CREAT
ok deraadt@ ian@
Diffstat (limited to 'app/xpr/xpr.c')
-rw-r--r--app/xpr/xpr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/xpr/xpr.c b/app/xpr/xpr.c
index 90b1b66d0..9acb77886 100644
--- a/app/xpr/xpr.c
+++ b/app/xpr/xpr.c
@@ -700,7 +700,7 @@ void parse_args(
}
if (infilename) {
- f = open(infilename, O_RDONLY|O_BINARY, 0);
+ f = open(infilename, O_RDONLY|O_BINARY);
if (f < 0) {
fprintf(stderr, "xpr: error opening \"%s\" for input\n",
infilename);
@@ -716,7 +716,7 @@ void parse_args(
if (!(*flags & F_APPEND)) {
f = open(output_filename, O_CREAT|O_WRONLY|O_TRUNC, 0664);
} else {
- f = open(output_filename, O_WRONLY, 0);
+ f = open(output_filename, O_WRONLY);
}
if (f < 0) {
fprintf(stderr, "xpr: error opening \"%s\" for output\n",