cosmetic
This commit is contained in:
+1
-1
@@ -124,7 +124,7 @@ extern "C" void epicsShareAPI removeDuplicateAddresses
|
||||
|
||||
while ( (pRawNode = ellGet ( pSrcList ) ) ) {
|
||||
assert ( offsetof (osiSockAddrNode, node) == 0 );
|
||||
osiSockAddrNode *pNode = reinterpret_cast<osiSockAddrNode *> ( pRawNode );
|
||||
osiSockAddrNode *pNode = reinterpret_cast <osiSockAddrNode *> ( pRawNode );
|
||||
osiSockAddrNode *pTmpNode;
|
||||
|
||||
if ( pNode->addr.sa.sa_family == AF_INET ) {
|
||||
|
||||
@@ -126,7 +126,7 @@ caStatus outBuf::copyInHeader ( ca_uint16_t response, ca_uint32_t payloadSize,
|
||||
else {
|
||||
pHdr->m_postsize = epicsHTON16 ( 0xffff );
|
||||
pHdr->m_count = epicsHTON16 ( 0 );
|
||||
ca_uint32_t * pLW = reinterpret_cast <ca_uint32_t *> ( pHdr + 1 );
|
||||
ca_uint32_t * pLW = reinterpret_cast < ca_uint32_t * > ( pHdr + 1 );
|
||||
pLW[0] = epicsHTON32 ( alignedPayloadSize );
|
||||
pLW[1] = epicsHTON32 ( nElem );
|
||||
pPayload = reinterpret_cast < char * > ( pLW + 2 );
|
||||
|
||||
@@ -30,12 +30,12 @@ static void forcePort (ELLLIST *pList, unsigned short port)
|
||||
{
|
||||
osiSockAddrNode *pNode;
|
||||
|
||||
pNode = reinterpret_cast <osiSockAddrNode *> (ellFirst ( pList ));
|
||||
pNode = reinterpret_cast < osiSockAddrNode * > ( ellFirst ( pList ) );
|
||||
while ( pNode ) {
|
||||
if ( pNode->addr.sa.sa_family == AF_INET ) {
|
||||
pNode->addr.ia.sin_port = htons (port);
|
||||
}
|
||||
pNode = reinterpret_cast <osiSockAddrNode *> (ellNext ( &pNode->node ));
|
||||
pNode = reinterpret_cast < osiSockAddrNode * > ( ellNext ( &pNode->node ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ casDGIntfIO::casDGIntfIO ( caServerI & serverIn, clientBufMemoryManager & memMgr
|
||||
socket_close (this->sock);
|
||||
throw S_cas_noInterface;
|
||||
}
|
||||
pAddr = reinterpret_cast <osiSockAddrNode *> (ellFirst (&BCastAddrList));
|
||||
pAddr = reinterpret_cast < osiSockAddrNode * > ( ellFirst ( &BCastAddrList ) );
|
||||
serverBCastAddr.ia = pAddr->addr.ia;
|
||||
serverBCastAddr.ia.sin_port = htons (this->dgPort);
|
||||
|
||||
|
||||
@@ -69,9 +69,9 @@ casIntfIO::casIntfIO (const caNetAddr &addrIn) :
|
||||
}
|
||||
# endif
|
||||
|
||||
status = bind(this->sock,
|
||||
status = bind ( this->sock,
|
||||
reinterpret_cast <sockaddr *> (&this->addr),
|
||||
sizeof(this->addr));
|
||||
sizeof(this->addr) );
|
||||
if (status<0) {
|
||||
if (SOCKERRNO == SOCK_EADDRINUSE) {
|
||||
//
|
||||
@@ -80,9 +80,10 @@ casIntfIO::casIntfIO (const caNetAddr &addrIn) :
|
||||
// work correctly)
|
||||
//
|
||||
this->addr.sin_port = ntohs (0);
|
||||
status = bind(this->sock,
|
||||
reinterpret_cast <sockaddr *> (&this->addr),
|
||||
sizeof(this->addr));
|
||||
status = bind(
|
||||
this->sock,
|
||||
reinterpret_cast <sockaddr *> (&this->addr),
|
||||
sizeof(this->addr) );
|
||||
}
|
||||
if (status<0) {
|
||||
char buf[64];
|
||||
@@ -103,9 +104,10 @@ casIntfIO::casIntfIO (const caNetAddr &addrIn) :
|
||||
}
|
||||
|
||||
addrSize = ( osiSocklen_t ) sizeof (this->addr);
|
||||
status = getsockname (this->sock,
|
||||
reinterpret_cast <sockaddr *> (&this->addr)
|
||||
, &addrSize);
|
||||
status = getsockname (
|
||||
this->sock,
|
||||
reinterpret_cast <sockaddr *> ( &this->addr ),
|
||||
&addrSize );
|
||||
if (status) {
|
||||
errlogPrintf("CAS: getsockname() error %s\n",
|
||||
SOCKERRSTR(SOCKERRNO));
|
||||
|
||||
Reference in New Issue
Block a user