diff options
author | Xavier Santolaria <xsa@cvs.openbsd.org> | 2005-07-23 10:59:48 +0000 |
---|---|---|
committer | Xavier Santolaria <xsa@cvs.openbsd.org> | 2005-07-23 10:59:48 +0000 |
commit | 9cb789f35012b533e6bb67128d89a9154482620c (patch) | |
tree | d6b5c4ee0eac90d2b324aa9148f58763c0f54d1b /usr.bin/cvs/req.c | |
parent | a5c25d0140b061a6d3a831d8ce48bce43b8835fc (diff) |
use cvs_chdir();
Diffstat (limited to 'usr.bin/cvs/req.c')
-rw-r--r-- | usr.bin/cvs/req.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/usr.bin/cvs/req.c b/usr.bin/cvs/req.c index 4e8ee6eceb5..6fa2098b74e 100644 --- a/usr.bin/cvs/req.c +++ b/usr.bin/cvs/req.c @@ -1,4 +1,4 @@ -/* $OpenBSD: req.c,v 1.27 2005/07/22 17:55:35 xsa Exp $ */ +/* $OpenBSD: req.c,v 1.28 2005/07/23 10:59:47 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -292,10 +292,8 @@ cvs_req_directory(int reqid, char *line) * Lets make sure we always start at the correct * directory. */ - if (chdir(cvs_server_tmpdir) == -1) { - cvs_log(LP_ERRNO, "failed to change to top directory"); + if (cvs_chdir(cvs_server_tmpdir) == -1) return (-1); - } /* * Set repository path. @@ -661,10 +659,8 @@ cvs_req_command(int reqid, char *line) /* switch to the correct directory */ if (cmdp->cmd_op != CVS_OP_VERSION) { - if (chdir(cvs_server_tmpdir) == -1) { - cvs_log(LP_ERRNO, "failed to change dir"); + if (cvs_chdir(cvs_server_tmpdir) == -1) return (-1); - } } ret = cvs_startcmd(cmdp, cvs_req_nargs, cvs_req_args); |