summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@cvs.openbsd.org>2010-09-08 15:15:51 +0000
committerTobias Stoeckmann <tobias@cvs.openbsd.org>2010-09-08 15:15:51 +0000
commit98e3d75e2552c7f1eb522392907416b68fadecfa (patch)
treed7e7a8223a937523a124da61d14b3af15e3eee3b /usr.bin
parentdcfac19c137f5f64521068c172324430a8cf2e03 (diff)
Set rcs_suffixes to default value on initialization.
ok ray zinovik
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/rcs/ci.c6
-rw-r--r--usr.bin/rcs/co.c6
-rw-r--r--usr.bin/rcs/rcsprog.c4
-rw-r--r--usr.bin/rcs/rcsutil.c6
4 files changed, 5 insertions, 17 deletions
diff --git a/usr.bin/rcs/ci.c b/usr.bin/rcs/ci.c
index e8f654ff69e..d50f8d165bf 100644
--- a/usr.bin/rcs/ci.c
+++ b/usr.bin/rcs/ci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ci.c,v 1.210 2010/07/30 21:47:18 ray Exp $ */
+/* $OpenBSD: ci.c,v 1.211 2010/09/08 15:15:50 tobias Exp $ */
/*
* Copyright (c) 2005, 2006 Niall O'Higgins <niallo@openbsd.org>
* All rights reserved.
@@ -242,10 +242,6 @@ checkin_main(int argc, char **argv)
if ((pb.username = getlogin()) == NULL)
err(1, "getlogin");
- /* If -x flag was not given, use default. */
- if (rcs_suffixes == NULL)
- rcs_suffixes = RCS_DEFAULT_SUFFIX;
-
for (i = 0; i < argc; i++) {
/*
* The pb.flags and pb.openflags may change during
diff --git a/usr.bin/rcs/co.c b/usr.bin/rcs/co.c
index a6860d021b2..23101957a28 100644
--- a/usr.bin/rcs/co.c
+++ b/usr.bin/rcs/co.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: co.c,v 1.113 2010/07/30 21:47:18 ray Exp $ */
+/* $OpenBSD: co.c,v 1.114 2010/09/08 15:15:50 tobias Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -156,10 +156,6 @@ checkout_main(int argc, char **argv)
if ((username = getlogin()) == NULL)
err(1, "getlogin");
- /* If -x flag was not given, use default. */
- if (rcs_suffixes == NULL)
- rcs_suffixes = RCS_DEFAULT_SUFFIX;
-
for (i = 0; i < argc; i++) {
fd = rcs_choosefile(argv[i], fpath, sizeof(fpath));
if (fd < 0) {
diff --git a/usr.bin/rcs/rcsprog.c b/usr.bin/rcs/rcsprog.c
index db844f81608..3171f689196 100644
--- a/usr.bin/rcs/rcsprog.c
+++ b/usr.bin/rcs/rcsprog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsprog.c,v 1.148 2010/07/23 08:31:19 ray Exp $ */
+/* $OpenBSD: rcsprog.c,v 1.149 2010/09/08 15:15:50 tobias Exp $ */
/*
* Copyright (c) 2005 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -41,7 +41,7 @@ const char rcs_version[] = "OpenRCS 4.5";
int rcsflags;
int rcs_optind;
char *rcs_optarg;
-char *rcs_suffixes;
+char *rcs_suffixes = RCS_DEFAULT_SUFFIX;
char *rcs_tmpdir = RCS_TMPDIR_DEFAULT;
struct rcs_prog {
diff --git a/usr.bin/rcs/rcsutil.c b/usr.bin/rcs/rcsutil.c
index 80948a00408..54f737f5c52 100644
--- a/usr.bin/rcs/rcsutil.c
+++ b/usr.bin/rcs/rcsutil.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsutil.c,v 1.35 2010/07/28 09:07:11 ray Exp $ */
+/* $OpenBSD: rcsutil.c,v 1.36 2010/09/08 15:15:50 tobias Exp $ */
/*
* Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org>
@@ -153,10 +153,6 @@ rcs_choosefile(const char *filename, char *out, size_t len)
char *p, *ext, name[MAXPATHLEN], *next, *ptr, rcsdir[MAXPATHLEN],
*suffixes, rcspath[MAXPATHLEN];
- /* If -x flag was not given, use default. */
- if (rcs_suffixes == NULL)
- rcs_suffixes = RCS_DEFAULT_SUFFIX;
-
fd = -1;
/*