You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by je...@apache.org on 2020/12/03 11:23:13 UTC

[incubator-nuttx] branch master updated (316cdcc -> ad66ea5)

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

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


    from 316cdcc  net/sockopt: Try usrsock further if the protocol not available
     new ab78bae  net/igmp: add sanity check to handle allocate fail
     new ad66ea5  net/igmp: fix nxstyle warning

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 net/igmp/igmp_join.c | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)


[incubator-nuttx] 02/02: net/igmp: fix nxstyle warning

Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit ad66ea51e52da97870c29c94a0f8e4d39cc178b3
Author: chao.an <an...@xiaomi.com>
AuthorDate: Mon Nov 30 15:20:24 2020 +0800

    net/igmp: fix nxstyle warning
    
    Change-Id: I6bb84038e035b81ea66b128ebf109f4a392ee6ab
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 net/igmp/igmp_join.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/net/igmp/igmp_join.c b/net/igmp/igmp_join.c
index 1e8876d..c28b101 100644
--- a/net/igmp/igmp_join.c
+++ b/net/igmp/igmp_join.c
@@ -19,21 +19,21 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of CITEL Technologies Ltd nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
+ * 3. Neither the name of CITEL Technologies Ltd nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY CITEL TECHNOLOGIES AND CONTRIBUTORS ``AS IS''
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL CITEL TECHNOLOGIES OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * ARE DISCLAIMED.  IN NO EVENT SHALL CITEL TECHNOLOGIES OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
  *
  ****************************************************************************/
 


[incubator-nuttx] 01/02: net/igmp: add sanity check to handle allocate fail

Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit ab78bae12f13535bdbf18aaa716688a370ad8ccb
Author: chao.an <an...@xiaomi.com>
AuthorDate: Mon Nov 30 14:35:11 2020 +0800

    net/igmp: add sanity check to handle allocate fail
    
    Change-Id: Ia3128c9c2b219345fb6ac2789ece7760c6aee663
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 net/igmp/igmp_join.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/igmp/igmp_join.c b/net/igmp/igmp_join.c
index c87f231..1e8876d 100644
--- a/net/igmp/igmp_join.c
+++ b/net/igmp/igmp_join.c
@@ -135,6 +135,11 @@ int igmp_joingroup(struct net_driver_s *dev,
 
       ninfo("Join to new group: %08" PRIx32 "\n", (uint32_t)grpaddr->s_addr);
       group = igmp_grpalloc(dev, &grpaddr->s_addr);
+      if (group == NULL)
+        {
+          return -EADDRNOTAVAIL;
+        }
+
       IGMP_STATINCR(g_netstats.igmp.joins);
 
       /* Send the Membership Report */