From 92207c0ba78a393c8646260824b8865f5eb7f96d Mon Sep 17 00:00:00 2001 From: Xavier Santolaria Date: Tue, 17 Jul 2007 19:56:09 +0000 Subject: Simplify the way we check wether the issued command is `log' or `rlog'. Input and OK ray@. --- usr.bin/cvs/getlog.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'usr.bin') 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 * Copyright (c) 2006 Joris Vink @@ -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(); } -- cgit v1.2.3