moved loop exit condition to top of loop

This commit is contained in:
Jeff Hill
2002-07-29 18:10:43 +00:00
parent f9bc76ff52
commit 0187fdd50d

View File

@@ -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<cadg *>(&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 ) {