diff --git a/src/ca/cac.cpp b/src/ca/cac.cpp index 9c615fc72..61f337bec 100644 --- a/src/ca/cac.cpp +++ b/src/ca/cac.cpp @@ -254,7 +254,7 @@ void cac::processRecvBacklog () this->iiuListMutex.lock (); piiu = this->iiuListRecvPending.get (); - if (!piiu) { + if ( ! piiu ) { this->iiuListMutex.unlock (); break; } @@ -263,14 +263,14 @@ void cac::processRecvBacklog () this->iiuListIdle.add (*piiu); this->iiuListMutex.unlock (); - if (piiu->state == iiu_disconnected) { + if ( piiu->state == iiu_disconnected ) { delete piiu; continue; } char *pProto = (char *) cacRingBufferReadReserveNoBlock (&piiu->recv, &bytesToProcess); - while (pProto) { + while ( pProto ) { status = piiu->post_msg (pProto, bytesToProcess); if ( status == ECA_NORMAL ) { cacRingBufferReadCommit (&piiu->recv, bytesToProcess); diff --git a/src/ca/tcpiiu.cpp b/src/ca/tcpiiu.cpp index 4f6209a73..9aace5404 100644 --- a/src/ca/tcpiiu.cpp +++ b/src/ca/tcpiiu.cpp @@ -1196,7 +1196,7 @@ int tcpiiu::post_msg (char *pInBuf, unsigned long blockSize) { unsigned long size; - while (blockSize) { + while ( blockSize ) { /* * fetch a complete message header @@ -1208,10 +1208,10 @@ int tcpiiu::post_msg (char *pInBuf, unsigned long blockSize) size = min (size, blockSize); pHdr = (char *) &this->curMsg; - memcpy( pHdr + this->curMsgBytes, pInBuf, size); + memcpy ( pHdr + this->curMsgBytes, pInBuf, size); this->curMsgBytes += size; - if (this->curMsgBytes < sizeof(this->curMsg)) { + if ( this->curMsgBytes < sizeof (this->curMsg) ) { #if 0 printf ("waiting for %d msg hdr bytes\n", sizeof(this->curMsg) - this->curMsgBytes); @@ -1225,8 +1225,7 @@ int tcpiiu::post_msg (char *pInBuf, unsigned long blockSize) /* * fix endian of bytes */ - this->curMsg.m_postsize = - ntohs (this->curMsg.m_postsize); + this->curMsg.m_postsize = ntohs (this->curMsg.m_postsize); this->curMsg.m_cmmd = ntohs (this->curMsg.m_cmmd); this->curMsg.m_dataType = ntohs (this->curMsg.m_dataType); this->curMsg.m_count = ntohs (this->curMsg.m_count);