diff --git a/include/netpacket/netlink.h b/include/netpacket/netlink.h index 2354bb06ba1..118004034f8 100644 --- a/include/netpacket/netlink.h +++ b/include/netpacket/netlink.h @@ -719,7 +719,7 @@ enum PREFIX_UNSPEC, PREFIX_ADDRESS, PREFIX_CACHEINFO, - PREFIX_MAX + PREFIX_MAX = PREFIX_CACHEINFO }; struct prefix_cacheinfo @@ -801,7 +801,7 @@ enum { NDUSEROPT_UNSPEC, NDUSEROPT_SRCADDR, - NDUSEROPT_MAX + NDUSEROPT_MAX = NDUSEROPT_SRCADDR }; /* This struct should be in sync with struct rtnl_link_stats64 */ diff --git a/net/netlink/netlink.h b/net/netlink/netlink.h index 8bbaea02cbb..ccb88d56634 100644 --- a/net/netlink/netlink.h +++ b/net/netlink/netlink.h @@ -81,7 +81,7 @@ FAR struct netlink_ext_ack *__extack = (extack); \ if (__extack) \ { \ - __extack->msg = __msg; \ + __extack->_msg = __msg; \ __extack->bad_attr = (attr); \ } \ } \ @@ -229,7 +229,7 @@ enum }; /* struct netlink_ext_ack - netlink extended ACK report struct - * msg: message string to report - don't access directly, use + * _msg: message string to report - don't access directly, use * nl_set_err_msg_attr * bad_attr: attribute with error * cookie: cookie data to return to userspace (for success) @@ -238,7 +238,7 @@ enum struct netlink_ext_ack { - FAR const char *msg; + FAR const char *_msg; FAR const struct nlattr *bad_attr; uint8_t cookie[NETLINK_MAX_COOKIE_LEN]; uint8_t cookie_len; diff --git a/net/netlink/netlink_sockif.c b/net/netlink/netlink_sockif.c index 5a70d7f9f81..f5d6b112dd6 100644 --- a/net/netlink/netlink_sockif.c +++ b/net/netlink/netlink_sockif.c @@ -744,7 +744,6 @@ static ssize_t netlink_recvmsg(FAR struct socket *psock, static int netlink_close(FAR struct socket *psock) { FAR struct netlink_conn_s *conn = psock->s_conn; - int ret = OK; /* Perform some pre-close operations for the NETLINK socket type. */ @@ -758,14 +757,6 @@ static int netlink_close(FAR struct socket *psock) conn->crefs = 0; netlink_free(psock->s_conn); - - if (ret < 0) - { - /* Return with error code, but free resources. */ - - nerr("ERROR: netlink_close failed: %d\n", ret); - return ret; - } } else { @@ -774,7 +765,7 @@ static int netlink_close(FAR struct socket *psock) conn->crefs--; } - return ret; + return OK; } #endif /* CONFIG_NET_NETLINK */