From 01b3d77a461dd72becb18975e26dff5a152b506b Mon Sep 17 00:00:00 2001 From: joris Date: Fri, 20 May 2005 20:00:53 +0000 Subject: correct wrong error code usage. ok jfb@, xsa@ --- usr.bin/cvs/commit.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'usr.bin/cvs/commit.c') 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 * 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); -- cgit v1.2.3-59-g8ed1b