From abfcff05917104c466d7d5ec2bbbc422f7649f95 Mon Sep 17 00:00:00 2001 From: jfb Date: Tue, 22 Feb 2005 23:34:28 +0000 Subject: more error checking on protocol calls when running in client mode --- usr.bin/cvs/commit.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'usr.bin/cvs/commit.c') 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 * 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", -- cgit v1.2.3-59-g8ed1b