nuttx/net/ip: fix nxstyle issues in macro

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko 2023-09-15 22:03:01 +03:00 committed by Xiang Xiao
parent 88c1a55efd
commit 7314faaba4

View File

@ -279,10 +279,12 @@ extern "C"
****************************************************************************/
#define net_ipaddr(addr, addr0, addr1, addr2, addr3) \
do { \
do \
{ \
addr = HTONL((uint32_t)(addr0) << 24 | (uint32_t)(addr1) << 16 | \
(uint32_t)(addr2) << 8 | (uint32_t)(addr3)); \
} while (0)
} \
while (0)
/****************************************************************************
* Macro: net_ip4addr_conv32
@ -336,7 +338,8 @@ extern "C"
****************************************************************************/
#define ip6_addr(addr,addr0,addr1,addr2,addr3,addr4,addr5,addr6,addr7) \
do { \
do \
{ \
((FAR uint16_t *)(addr))[0] = HTONS((addr0)); \
((FAR uint16_t *)(addr))[1] = HTONS((addr1)); \
((FAR uint16_t *)(addr))[2] = HTONS((addr2)); \
@ -345,7 +348,8 @@ extern "C"
((FAR uint16_t *)(addr))[5] = HTONS((addr5)); \
((FAR uint16_t *)(addr))[6] = HTONS((addr6)); \
((FAR uint16_t *)(addr))[7] = HTONS((addr7)); \
} while (0)
} \
while (0)
/****************************************************************************
* Macro: ip6_map_ipv4addr