summaryrefslogtreecommitdiff
path: root/usr.bin/cvs
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2021-10-25 10:07:13 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2021-10-25 10:07:13 +0000
commit2933e3ab438322bf4514d58834747672f3d4d3fb (patch)
tree2bfb420d18635a0d3fdcba4a27553b68c9068ba4 /usr.bin/cvs
parent9a8888a8f129d292d098e5f3f3a7030ff865dcc1 (diff)
do not need a temporary one time use variable which befuddles
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r--usr.bin/cvs/init.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/cvs/init.c b/usr.bin/cvs/init.c
index 30f1dbf1d15..57110a862f2 100644
--- a/usr.bin/cvs/init.c
+++ b/usr.bin/cvs/init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init.c,v 1.41 2017/08/28 19:33:20 otto Exp $ */
+/* $OpenBSD: init.c,v 1.42 2021/10/25 10:07:12 deraadt Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org>
@@ -143,15 +143,14 @@ init_mkfile(char *path, char **content)
{
BUF *b;
size_t len;
- int fd, openflags, rcsflags;
+ int fd, rcsflags;
char rpath[PATH_MAX];
char **p;
RCSFILE *file;
- openflags = O_WRONLY | O_CREAT | O_EXCL;
rcsflags = RCS_WRITE | RCS_CREATE;
- if ((fd = open(path, openflags, 0444)) == -1)
+ if ((fd = open(path, O_WRONLY | O_CREAT | O_EXCL, 0444)) == -1)
fatal("init_mkfile: open: `%s': %s", path, strerror(errno));
if (content != NULL) {