1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-29 16:31:18 +01:00

gnrc_sixlowpan_iphc: remove duplicate gnrc_netif_hdr_get_netif()

The interface is already fetched in the beginning of the function and
doesn't change during its run, so getting the interface again at this
point is just redundant.
This commit is contained in:
Martine S. Lenders 2019-11-01 18:29:44 +01:00
parent 865059fc66
commit f33111a9c2

View File

@ -673,6 +673,7 @@ void gnrc_sixlowpan_iphc_send(gnrc_pktsnip_t *pkt, void *ctx, unsigned page)
uint16_t inline_pos = SIXLOWPAN_IPHC_HDR_LEN;
(void)ctx;
assert(iface != NULL);
dispatch = NULL; /* use dispatch as temporary pointer for prev */
/* determine maximum dispatch size and write protect all headers until
* then because they will be removed */
@ -1035,9 +1036,7 @@ void gnrc_sixlowpan_iphc_send(gnrc_pktsnip_t *pkt, void *ctx, unsigned page)
dispatch->next = pkt->next;
pkt->next = dispatch;
gnrc_netif_t *netif = gnrc_netif_hdr_get_netif(netif_hdr);
assert(netif != NULL);
gnrc_sixlowpan_multiplex_by_size(pkt, orig_datagram_size, netif, page);
gnrc_sixlowpan_multiplex_by_size(pkt, orig_datagram_size, iface, page);
}
/** @} */