fixed sun pro warnings

This commit is contained in:
Jeff Hill
2000-08-25 20:55:15 +00:00
parent 205aaf9d05
commit 2549ad8615
2 changed files with 4 additions and 4 deletions

View File

@@ -20,7 +20,7 @@ hostNameCache::hostNameCache ( const osiSockAddr &addr, ipAddrToAsciiEngine &eng
ipAddrToAsciiAsynchronous ( addr ),
pHostName ( 0u )
{
this->ioInitiate ( engine );
this->ioInitiate ( engine );
}
hostNameCache::~hostNameCache ()
@@ -50,8 +50,8 @@ void hostNameCache::hostName ( char *pBuf, unsigned bufSize ) const
strncpy ( pBuf, this->pHostName, bufSize);
}
else {
osiSockAddr addr = this->address();
sockAddrToDottedA ( &addr.sa, pBuf, bufSize );
osiSockAddr tmpAddr = this->address ();
sockAddrToDottedA ( &tmpAddr.sa, pBuf, bufSize );
}
pBuf [ bufSize - 1u ] = '\0';
}

View File

@@ -23,7 +23,7 @@ localHostName::localHostName ()
int status = osiSockAttach ();
if ( status ) {
this->attachedToSockLib = true;
int status = gethostname ( this->cache, sizeof ( this->cache ) );
status = gethostname ( this->cache, sizeof ( this->cache ) );
if ( status ) {
strncpy ( this->cache, "<unknown host>", sizeof ( this->cache ) );
localHostName::cache [ sizeof ( this->cache ) - 1u ] = '\0';