[riot-notifications] [RIOT-OS/RIOT] tools/ci: fix remaining errors reported by coccinelle static check (#12281)

Alexandre Abadie notifications at github.com
Fri Sep 20 10:59:59 CEST 2019

aabadie commented on this pull request.

> @@ -183,9 +183,7 @@ static bool _send_wa(gnrc_netif_t *netif)
     /* Send WA */
     if (_gnrc_lwmac_transmit(netif, pkt) < 0) {
         LOG_ERROR("ERROR: [LWMAC-rx] Send WA failed.");
-        if (pkt != NULL) {
-            gnrc_pktbuf_release(pkt);
-        }
+        gnrc_pktbuf_release(pkt);

That's also why I'm unsure of this change. Looking at the code, [this line](https://github.com/RIOT-OS/RIOT/blob/master/sys/net/gnrc/link_layer/lwmac/rx_state_machine.c#L161) already checks if `pkt` is not null and return if it's null. I don't know if code in between could change that non null pkt value.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190920/4685ece4/attachment.htm>

More information about the notifications mailing list