Minor fixes to apps/netutils/Kconfig and nuttx/libc/net/lib_inetntoa.c from Max Neklyudov

This commit is contained in:
Gregory Nutt 2015-05-19 12:07:07 -06:00
parent 857a2d08d9
commit 87f4f0ccdd

View File

@ -65,16 +65,16 @@
FAR char *inet_ntoa(struct in_addr in)
{
static char buffer[INET_ADDRSTRLEN+2];
FAR char *ptr = (FAR char*)&in.s_addr;
sprintf(buffer, "%d.%d.%d.%d", ptr[0], ptr[1], ptr[2], ptr[3]);
FAR unsigned char *ptr = (FAR unsigned char*)&in.s_addr;
sprintf(buffer, "%u.%u.%u.%u", ptr[0], ptr[1], ptr[2], ptr[3]);
return buffer;
}
#else
FAR char *_inet_ntoa(in_addr_t in)
{
static char buffer[INET_ADDRSTRLEN+2];
FAR char *ptr = (FAR char*)∈
sprintf(buffer, "%d.%d.%d.%d", ptr[0], ptr[1], ptr[2], ptr[3]);
FAR unsigned char *ptr = (FAR unsigned char*)∈
sprintf(buffer, "%u.%u.%u.%u", ptr[0], ptr[1], ptr[2], ptr[3]);
return buffer;
}
#endif