From 813f4d424cdd3af1ed3db0485589cdbc3019a917 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 6 Nov 2018 15:08:16 -0600 Subject: [PATCH] net/mld: Fix a few off-by-one alignment issues spotted by tools/nxstyle. --- net/mld/mld_done.c | 6 +++--- net/mld/mld_poll.c | 20 ++++++++++---------- net/mld/mld_query.c | 28 ++++++++++++++-------------- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/net/mld/mld_done.c b/net/mld/mld_done.c index 82fc75db46..2413998173 100644 --- a/net/mld/mld_done.c +++ b/net/mld/mld_done.c @@ -88,9 +88,9 @@ int mld_done_v1(FAR struct net_driver_s *dev, mldinfo("Version 1 Multicast Listener Done\n"); MLD_STATINCR(g_netstats.mld.done_received); - /* The done message is sent to the link-local, all routers multicast - * address. Find the group using the group address in the Done message. - */ + /* The done message is sent to the link-local, all routers multicast + * address. Find the group using the group address in the Done message. + */ group = mld_grpfind(dev, done->grpaddr); if (group == NULL) diff --git a/net/mld/mld_poll.c b/net/mld/mld_poll.c index ad3802b93f..8c08362929 100644 --- a/net/mld/mld_poll.c +++ b/net/mld/mld_poll.c @@ -117,18 +117,18 @@ void mld_poll(FAR struct net_driver_s *dev) /* Indicate that the message has been sent */ - CLR_MLD_SCHEDMSG(group->flags); - group->msgtype = MLD_SEND_NONE; + CLR_MLD_SCHEDMSG(group->flags); + group->msgtype = MLD_SEND_NONE; - /* If there is a thread waiting fore the message to be sent, wake - * it up. - */ + /* If there is a thread waiting fore the message to be sent, wake + * it up. + */ - if (IS_MLD_WAITMSG(group->flags)) - { - mldinfo("Awakening waiter\n"); - nxsem_post(&group->sem); - } + if (IS_MLD_WAITMSG(group->flags)) + { + mldinfo("Awakening waiter\n"); + nxsem_post(&group->sem); + } /* And break out of the loop */ diff --git a/net/mld/mld_query.c b/net/mld/mld_query.c index cc458c209c..78060c561e 100644 --- a/net/mld/mld_query.c +++ b/net/mld/mld_query.c @@ -385,24 +385,24 @@ int mld_query(FAR struct net_driver_s *dev, mld_check_querier(dev, ipv6, member); - /* Warn if we received a MLDv2 query in MLDv1 compatibility - * mode. - */ + /* Warn if we received a MLDv2 query in MLDv1 compatibility + * mode. + */ - if (!mldv1 && IS_MLD_V1COMPAT(member->flags)) - { - mldinfo("WARNING: MLDv2 query received in MLDv1 " - "compatibility mode\n"); - } + if (!mldv1 && IS_MLD_V1COMPAT(member->flags)) + { + mldinfo("WARNING: MLDv2 query received in MLDv1 " + "compatibility mode\n"); + } #ifdef CONFIG_NET_MLD_ROUTER - /* Save the number of members that reported in the previous - * query cycle; reset the number of members that have - * reported in the new query cycle. - */ + /* Save the number of members that reported in the previous + * query cycle; reset the number of members that have + * reported in the new query cycle. + */ - member->lstmbrs = member->members; - member->members = 0; + member->lstmbrs = member->members; + member->members = 0; #endif } }