mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 04:19:37 +08:00
devif/ipv6_input.c: fix compile warning
devif/ipv6_input.c: In function ‘ipv6_input’:
devif/ipv6_input.c:344:32: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
344 | if ((ipv6->destipaddr[0] & HTONS(0xff0f) != HTONS(0xff00)) &&
| ^
devif/ipv6_input.c:345:32: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
345 | (ipv6->destipaddr[0] & HTONS(0xff0f) != HTONS(0xff01)) &&
| ^
devif/ipv6_input.c:346:32: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
346 | (ipv6->destipaddr[0] & HTONS(0xff0f) != HTONS(0xff02)))
| ^
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
@@ -341,9 +341,9 @@ int ipv6_input(FAR struct net_driver_s *dev)
|
|||||||
* ffx2 are interface-local, and therefore, should not be forwarded
|
* ffx2 are interface-local, and therefore, should not be forwarded
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ((ipv6->destipaddr[0] & HTONS(0xff0f) != HTONS(0xff00)) &&
|
if (((ipv6->destipaddr[0] & HTONS(0xff0f)) != HTONS(0xff00)) &&
|
||||||
(ipv6->destipaddr[0] & HTONS(0xff0f) != HTONS(0xff01)) &&
|
((ipv6->destipaddr[0] & HTONS(0xff0f)) != HTONS(0xff01)) &&
|
||||||
(ipv6->destipaddr[0] & HTONS(0xff0f) != HTONS(0xff02)))
|
((ipv6->destipaddr[0] & HTONS(0xff0f)) != HTONS(0xff02)))
|
||||||
{
|
{
|
||||||
/* Forward broadcast packets */
|
/* Forward broadcast packets */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user