summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/release.c
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2005-07-23 10:59:48 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2005-07-23 10:59:48 +0000
commit9cb789f35012b533e6bb67128d89a9154482620c (patch)
treed6b5c4ee0eac90d2b324aa9148f58763c0f54d1b /usr.bin/cvs/release.c
parenta5c25d0140b061a6d3a831d8ce48bce43b8835fc (diff)
use cvs_chdir();
Diffstat (limited to 'usr.bin/cvs/release.c')
-rw-r--r--usr.bin/cvs/release.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/usr.bin/cvs/release.c b/usr.bin/cvs/release.c
index 9bc8ee0eb10..5a3bc2e085f 100644
--- a/usr.bin/cvs/release.c
+++ b/usr.bin/cvs/release.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: release.c,v 1.16 2005/07/22 16:27:29 joris Exp $ */
+/* $OpenBSD: release.c,v 1.17 2005/07/23 10:59:47 xsa Exp $ */
/*
* Copyright (c) 2005 Xavier Santolaria <xsa@openbsd.org>
* All rights reserved.
@@ -176,11 +176,8 @@ cvs_release_dir(CVSFILE *cf, void *arg)
cvs_log(LP_ERRNO, "cannot get current dir");
/* change dir before running the `cvs update' command */
- if (chdir(dpath) == -1) {
- cvs_log(LP_ERRNO, "cannot change to dir `%s'",
- dpath);
+ if (cvs_chdir(dpath) == -1)
return (CVS_EX_FILE);
- }
/* construct `cvs update' command */
l = snprintf(updcmd, sizeof(updcmd), "%s %s %s update",
@@ -222,11 +219,8 @@ cvs_release_dir(CVSFILE *cf, void *arg)
}
/* change back to original working dir */
- if (chdir(wdir) == -1) {
- cvs_log(LP_ERRNO, "cannot change to original "
- "working dir `%s'", wdir);
+ if (cvs_chdir(wdir) == -1)
return (CVS_EX_FILE);
- }
if (dflag == 1) {
if (!cvs_noexec && cvs_remove_dir(dpath) != 0) {