diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2005-05-20 20:00:54 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2005-05-20 20:00:54 +0000 |
commit | 810674bc8d2f234cd5f3edf64762ce5bbbd9eb07 (patch) | |
tree | 9ea6c1f81ec8083ee94186ff4c3b762b7c35963d /usr.bin/cvs/commit.c | |
parent | b7f424bf063934bb2d18aaa8573e5c818abcd8e7 (diff) |
correct wrong error code usage.
ok jfb@, xsa@
Diffstat (limited to 'usr.bin/cvs/commit.c')
-rw-r--r-- | usr.bin/cvs/commit.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c index a4474608c3f..9ed4fc7f4ec 100644 --- a/usr.bin/cvs/commit.c +++ b/usr.bin/cvs/commit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commit.c,v 1.32 2005/05/20 05:13:44 joris Exp $ */ +/* $OpenBSD: commit.c,v 1.33 2005/05/20 20:00:53 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -198,11 +198,13 @@ cvs_commit_file(CVSFILE *cf, void *arg) if (cf->cf_type == DT_DIR) { if (root->cr_method != CVS_METHOD_LOCAL) { - if (cf->cf_cvstat != CVS_FST_UNKNOWN) - ret = cvs_senddir(root, cf); + if (cf->cf_cvstat != CVS_FST_UNKNOWN) { + if (cvs_senddir(root, cf) < 0) + return (CVS_EX_PROTO); + } } - return (ret); + return (0); } cvs_file_getpath(cf, fpath, sizeof(fpath)); @@ -241,7 +243,7 @@ cvs_commit_file(CVSFILE *cf, void *arg) if (l == -1 || l >= (int)sizeof(rcspath)) { errno = ENAMETOOLONG; cvs_log(LP_ERRNO, "%s", rcspath); - return (-1); + return (CVS_EX_DATA); } return (0); |