summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2007-07-17 19:56:09 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2007-07-17 19:56:09 +0000
commit92207c0ba78a393c8646260824b8865f5eb7f96d (patch)
tree7aa27d988eef5f0292bf490cbd0f60a388d96c34
parentd99eb3b60bc585201885e6c41898e9f145478322 (diff)
Simplify the way we check wether the issued command is `log' or `rlog'.
Input and OK ray@.
-rw-r--r--usr.bin/cvs/getlog.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/cvs/getlog.c b/usr.bin/cvs/getlog.c
index b44a4738333..4e3d7216c92 100644
--- a/usr.bin/cvs/getlog.c
+++ b/usr.bin/cvs/getlog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getlog.c,v 1.74 2007/07/16 12:16:01 xsa Exp $ */
+/* $OpenBSD: getlog.c,v 1.75 2007/07/17 19:56:08 xsa Exp $ */
/*
* Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org>
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
@@ -136,7 +136,7 @@ cvs_getlog(int argc, char **argv)
if (runflags & L_LOGINS)
cvs_client_send_request("Argument -w%s", wlist);
} else {
- if (cvs_command[0] == 'r' &&
+ if (cvs_cmdop == CVS_OP_RLOG &&
chdir(current_cvsroot->cr_dir) == -1)
fatal("cvs_server_log: %s", strerror(errno));
@@ -153,10 +153,10 @@ cvs_getlog(int argc, char **argv)
if (current_cvsroot->cr_method != CVS_METHOD_LOCAL) {
cvs_client_send_files(argv, argc);
cvs_client_senddir(".");
- if (cvs_command[0] == 'r')
- cvs_client_send_request("rlog");
- else
- cvs_client_send_request("log");
+
+ cvs_client_send_request((cvs_cmdop == CVS_OP_RLOG) ?
+ "rlog" : "log");
+
cvs_client_get_responses();
}