This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 6f1c86d934ad7011392ad2529263af603f730f2b
Author: Xiang Xiao <xiaoxi...@xiaomi.com>
AuthorDate: Thu Apr 16 13:50:20 2020 +0800

    netlink: Fix the compiler warning in netlink_add_broadcast
    
    netlink/netlink_conn.c: In function 'netlink_add_broadcast':
    netlink/netlink_conn.c:319:45: warning: suggest parentheses around 
comparison in operand of '&' [-Wparentheses]
      319 |       if (conn->groups & (1 << (group - 1)) == 0)
          |                          ~~~~~~~~~~~~~~~~~~~^~~~
---
 net/netlink/netlink_conn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netlink/netlink_conn.c b/net/netlink/netlink_conn.c
index 9145ef2..96aed71 100644
--- a/net/netlink/netlink_conn.c
+++ b/net/netlink/netlink_conn.c
@@ -317,7 +317,7 @@ void netlink_add_broadcast(int group, FAR struct 
netlink_response_s *data)
 
   while ((conn = netlink_nextconn(conn)) != NULL)
     {
-      if (conn->groups & (1 << (group - 1)) == 0)
+      if ((conn->groups & (1 << (group - 1))) == 0)
         {
           continue;
         }

Reply via email to