fixed warning

This commit is contained in:
Jeff Hill
1996-11-02 02:42:19 +00:00
parent d8fc7ff7bd
commit da7f5837ec

View File

@@ -44,6 +44,8 @@
#include <inetLib.h>
#define maxPortDigits 16u
/*
* ipAddrToA ()
*/
@@ -51,10 +53,8 @@ void ipAddrToA (const struct sockaddr_in *pInetAddr,
char *pBuf, const unsigned bufSize)
{
char pName[INET_ADDR_LEN];
const unsigned maxPortDigits = 16u;
char tmp[maxPortDigits+1];
if (pInetAddr->sin_family != AF_INET) {
strncpy(pName, "UKN ADDR FAMILY", sizeof(pName)-1);
pName[sizeof(pName)-1u]='\0';