diff options
Diffstat (limited to 'nuttx/lib/net')
-rw-r--r-- | nuttx/lib/net/lib_inetntop.c | 4 | ||||
-rw-r--r-- | nuttx/lib/net/lib_inetpton.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/nuttx/lib/net/lib_inetntop.c b/nuttx/lib/net/lib_inetntop.c index 3c8eb936a..dc6a2d0d7 100644 --- a/nuttx/lib/net/lib_inetntop.c +++ b/nuttx/lib/net/lib_inetntop.c @@ -109,7 +109,7 @@ FAR const char *inet_ntop(int af, FAR const void *src, FAR char *dst, socklen_t sprintf(dst, "%d.%d.%d.%d", ptr[0], ptr[1], ptr[2], ptr[3]); return dst; #else - FAR const in6_addr *in6_addr; + FAR const struct in6_addr *in6_addr; uint16_t warray[8]; int offset; int entry; @@ -131,7 +131,7 @@ FAR const char *inet_ntop(int af, FAR const void *src, FAR char *dst, socklen_t goto errout; } - in6_addr = (FAR const in6_addr *)src; + in6_addr = (FAR const struct in6_addr *)src; entry = -1; maxentry = -1; maxcount = 0; diff --git a/nuttx/lib/net/lib_inetpton.c b/nuttx/lib/net/lib_inetpton.c index b4b97f2ae..5371cd3f2 100644 --- a/nuttx/lib/net/lib_inetpton.c +++ b/nuttx/lib/net/lib_inetpton.c @@ -273,14 +273,14 @@ int inet_pton(int af, FAR const char *src, FAR void *dst) if (!rtime) { - ip[(nsep << 1) + 0] = (uint8_t)(value >> 8)) & 0xff; - ip[(nsep << 1) + 1] = (uint8_t)(value >> 0)) & 0xff; + ip[(nsep << 1) + 0] = (uint8_t)((value >> 8) & 0xff); + ip[(nsep << 1) + 1] = (uint8_t)((value >> 0) & 0xff); nsep++; } else { - rip[(nrsep << 1) + 0] = (uint8_t)(value >> 8)) & 0xff; - rip[(nrsep << 1) + 1] = (uint8_t)(value >> 0)) & 0xff; + rip[(nrsep << 1) + 0] = (uint8_t)((value >> 8) & 0xff); + rip[(nrsep << 1) + 1] = (uint8_t)((value >> 0) & 0xff); nrsep++; } |