diff options
author | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2005-02-22 23:34:29 +0000 |
---|---|---|
committer | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2005-02-22 23:34:29 +0000 |
commit | 069b355470bc98d7f039fc29fc4848fef264c52a (patch) | |
tree | 6bb7dbb09ccfc3f188decba4427d7c6012909671 /usr.bin | |
parent | 96d98c9a986be2ff3c876ac363e14059b4a90a22 (diff) |
more error checking on protocol calls when running in client mode
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/commit.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c index 5835335dea8..769d14fb14e 100644 --- a/usr.bin/cvs/commit.c +++ b/usr.bin/cvs/commit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commit.c,v 1.14 2005/01/13 18:47:31 jfb Exp $ */ +/* $OpenBSD: commit.c,v 1.15 2005/02/22 23:34:28 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -219,8 +219,10 @@ cvs_commit_file(CVSFILE *cf, void *arg) return (-1); } - cvs_sendreq(root, CVS_REQ_MODIFIED, CVS_FILE_NAME(cf)); - cvs_sendfile(root, fpath); + if ((cvs_sendreq(root, CVS_REQ_MODIFIED, + CVS_FILE_NAME(cf)) < 0) || + (cvs_sendfile(root, fpath) < 0)) + return (-1); } snprintf(rcspath, sizeof(rcspath), "%s/%s/%s%s", |