fix inet_ntoa prototype to be standard, and fix ppp code that used the non-standard version

This commit is contained in:
jani
2004-03-10 13:23:04 +00:00
parent f9dea9d35b
commit 30e5dfddb9
3 changed files with 18 additions and 3 deletions

View File

@@ -300,9 +300,10 @@ inet_chksum_pbuf(struct pbuf *p)
/* Convert numeric IP address into decimal dotted ASCII representation.
* returns ptr to static buffer; not reentrant!
*/
u8_t *inet_ntoa(u32_t addr)
char *inet_ntoa(struct in_addr addr)
{
static u8_t str[16];
u32_t s_addr = addr.s_addr;
u8_t inv[3];
u8_t *rp;
u8_t *ap;
@@ -311,7 +312,7 @@ u8_t *inet_ntoa(u32_t addr)
u8_t i;
rp = str;
ap = (u8_t *)&addr;
ap = (u8_t *)&s_addr;
for(n = 0; n < 4; n++) {
i = 0;
do {