summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/cvs/cmd.c9
-rw-r--r--usr.bin/cvs/version.c11
2 files changed, 7 insertions, 13 deletions
diff --git a/usr.bin/cvs/cmd.c b/usr.bin/cvs/cmd.c
index ddd4fba5001..7236fbc4476 100644
--- a/usr.bin/cvs/cmd.c
+++ b/usr.bin/cvs/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.22 2005/05/31 08:58:47 xsa Exp $ */
+/* $OpenBSD: cmd.c,v 1.23 2005/06/02 20:12:06 joris Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -162,14 +162,15 @@ cvs_startcmd(struct cvs_cmd *cmd, int argc, char **argv)
if (cmd->cmd_op == CVS_OP_SERVER)
return cvs_server(argc, argv);
+ i = 1;
if (cmd->cmd_init != NULL) {
if ((ret = (*cmd->cmd_init)(cmd, argc, argv, &i)) != 0)
return (ret);
-
- argc -= i;
- argv += i;
}
+ argc -= i;
+ argv += i;
+
if (!(cmd->cmd_flags & CVS_CMD_ALLOWSPEC) && (argc > 0))
return (CVS_EX_USAGE);
diff --git a/usr.bin/cvs/version.c b/usr.bin/cvs/version.c
index ec32cd649f7..3092f956f8d 100644
--- a/usr.bin/cvs/version.c
+++ b/usr.bin/cvs/version.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: version.c,v 1.15 2005/05/31 08:58:48 xsa Exp $ */
+/* $OpenBSD: version.c,v 1.16 2005/06/02 20:12:06 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -47,7 +47,7 @@ struct cvs_cmd cvs_cmd_version = {
"",
NULL,
0,
- cvs_version_init,
+ NULL,
cvs_version_pre_exec,
NULL,
NULL,
@@ -58,13 +58,6 @@ struct cvs_cmd cvs_cmd_version = {
static int
-cvs_version_init(struct cvs_cmd *cmd, int argc, char **argv, int *arg)
-{
- *arg = 1;
- return (0);
-}
-
-static int
cvs_version_pre_exec(struct cvsroot *root)
{
if ((root != NULL) && (root->cr_method != CVS_METHOD_LOCAL))