From 83aa8b038b8a2c69799b799fec7cc0afd497fffd Mon Sep 17 00:00:00 2001 From: Tymoteusz Bloch Date: Mon, 26 Aug 2019 16:47:05 +0200 Subject: [PATCH] Supressed coverity warnings for intentional NULL passing to ip_reass_dequeue_datagram --- features/lwipstack/lwip/src/core/ipv4/lwip_ip4_frag.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/features/lwipstack/lwip/src/core/ipv4/lwip_ip4_frag.c b/features/lwipstack/lwip/src/core/ipv4/lwip_ip4_frag.c index b56ac23df1..47bbd2b723 100644 --- a/features/lwipstack/lwip/src/core/ipv4/lwip_ip4_frag.c +++ b/features/lwipstack/lwip/src/core/ipv4/lwip_ip4_frag.c @@ -206,9 +206,8 @@ ip_reass_free_complete_datagram(struct ip_reassdata *ipr, struct ip_reassdata *p pbuf_free(pcur); } /* Then, unchain the struct ip_reassdata from the list and free it. */ - if (prev != NULL) { - ip_reass_dequeue_datagram(ipr, prev); - } + /* coverity [FORWARD_NULL]*/ + ip_reass_dequeue_datagram(ipr, prev); LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed); ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - pbufs_freed); @@ -662,9 +661,8 @@ ip4_reass(struct pbuf *p) } /* release the sources allocate for the fragment queue entry */ - if (ipr_prev != NULL) { - ip_reass_dequeue_datagram(ipr, ipr_prev); - } + /* coverity [FORWARD_NULL]*/ + ip_reass_dequeue_datagram(ipr, ipr_prev); /* and adjust the number of pbufs currently queued for reassembly. */ clen = pbuf_clen(p); LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen);