From 0187fdd50d504162cd7a30f38762c27dc00b1bcf Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Mon, 29 Jul 2002 18:10:43 +0000 Subject: [PATCH] moved loop exit condition to top of loop --- src/cas/generic/casDGClient.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/cas/generic/casDGClient.cc b/src/cas/generic/casDGClient.cc index a87430257..f5f2bb6a9 100644 --- a/src/cas/generic/casDGClient.cc +++ b/src/cas/generic/casDGClient.cc @@ -378,7 +378,7 @@ outBufClient::flushCondition casDGClient::xSend ( char *pBufIn, // X aCC 361 assert ( nBytesAvailableToSend >= nBytesNeedToBeSent ); totalBytes = 0; - while ( true ) { + while ( totalBytes < nBytesNeedToBeSent ) { pHdr = reinterpret_cast(&pBufIn[totalBytes]); assert ( totalBytes <= bufSizeT_MAX-pHdr->cadg_nBytes ); @@ -406,10 +406,6 @@ outBufClient::flushCondition casDGClient::xSend ( char *pBufIn, // X aCC 361 } totalBytes += pHdr->cadg_nBytes; - - if ( totalBytes >= nBytesNeedToBeSent ) { - break; - } } if ( totalBytes ) {