diff options
author | 2005-02-22 23:34:28 +0000 | |
---|---|---|
committer | 2005-02-22 23:34:28 +0000 | |
commit | abfcff05917104c466d7d5ec2bbbc422f7649f95 (patch) | |
tree | 37e1082eb54b8a06d1e1e97405f11fb3ebcd2ee9 /usr.bin/cvs/commit.c | |
parent | use the file's name, and not its full path, when building the path to (diff) | |
download | wireguard-openbsd-abfcff05917104c466d7d5ec2bbbc422f7649f95.tar.xz wireguard-openbsd-abfcff05917104c466d7d5ec2bbbc422f7649f95.zip |
more error checking on protocol calls when running in client mode
Diffstat (limited to 'usr.bin/cvs/commit.c')
-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", |