mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 04:19:37 +08:00
net/mld: Fix a few off-by-one alignment issues spotted by tools/nxstyle.
This commit is contained in:
+3
-3
@@ -88,9 +88,9 @@ int mld_done_v1(FAR struct net_driver_s *dev,
|
|||||||
mldinfo("Version 1 Multicast Listener Done\n");
|
mldinfo("Version 1 Multicast Listener Done\n");
|
||||||
MLD_STATINCR(g_netstats.mld.done_received);
|
MLD_STATINCR(g_netstats.mld.done_received);
|
||||||
|
|
||||||
/* The done message is sent to the link-local, all routers multicast
|
/* The done message is sent to the link-local, all routers multicast
|
||||||
* address. Find the group using the group address in the Done message.
|
* address. Find the group using the group address in the Done message.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
group = mld_grpfind(dev, done->grpaddr);
|
group = mld_grpfind(dev, done->grpaddr);
|
||||||
if (group == NULL)
|
if (group == NULL)
|
||||||
|
|||||||
+10
-10
@@ -117,18 +117,18 @@ void mld_poll(FAR struct net_driver_s *dev)
|
|||||||
|
|
||||||
/* Indicate that the message has been sent */
|
/* Indicate that the message has been sent */
|
||||||
|
|
||||||
CLR_MLD_SCHEDMSG(group->flags);
|
CLR_MLD_SCHEDMSG(group->flags);
|
||||||
group->msgtype = MLD_SEND_NONE;
|
group->msgtype = MLD_SEND_NONE;
|
||||||
|
|
||||||
/* If there is a thread waiting fore the message to be sent, wake
|
/* If there is a thread waiting fore the message to be sent, wake
|
||||||
* it up.
|
* it up.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (IS_MLD_WAITMSG(group->flags))
|
if (IS_MLD_WAITMSG(group->flags))
|
||||||
{
|
{
|
||||||
mldinfo("Awakening waiter\n");
|
mldinfo("Awakening waiter\n");
|
||||||
nxsem_post(&group->sem);
|
nxsem_post(&group->sem);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* And break out of the loop */
|
/* And break out of the loop */
|
||||||
|
|
||||||
|
|||||||
+14
-14
@@ -385,24 +385,24 @@ int mld_query(FAR struct net_driver_s *dev,
|
|||||||
|
|
||||||
mld_check_querier(dev, ipv6, member);
|
mld_check_querier(dev, ipv6, member);
|
||||||
|
|
||||||
/* Warn if we received a MLDv2 query in MLDv1 compatibility
|
/* Warn if we received a MLDv2 query in MLDv1 compatibility
|
||||||
* mode.
|
* mode.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!mldv1 && IS_MLD_V1COMPAT(member->flags))
|
if (!mldv1 && IS_MLD_V1COMPAT(member->flags))
|
||||||
{
|
{
|
||||||
mldinfo("WARNING: MLDv2 query received in MLDv1 "
|
mldinfo("WARNING: MLDv2 query received in MLDv1 "
|
||||||
"compatibility mode\n");
|
"compatibility mode\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_NET_MLD_ROUTER
|
#ifdef CONFIG_NET_MLD_ROUTER
|
||||||
/* Save the number of members that reported in the previous
|
/* Save the number of members that reported in the previous
|
||||||
* query cycle; reset the number of members that have
|
* query cycle; reset the number of members that have
|
||||||
* reported in the new query cycle.
|
* reported in the new query cycle.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
member->lstmbrs = member->members;
|
member->lstmbrs = member->members;
|
||||||
member->members = 0;
|
member->members = 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user