mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
net/ng_sixlowpan: fix check for pkt==NULL
This commit is contained in:
parent
72e2187b75
commit
a38d881424
@ -154,7 +154,7 @@ static uint16_t _send_nth_fragment(ng_sixlowpan_netif_t *iface, ng_pktsnip_t *pk
|
||||
hdr->offset = (uint8_t)(offset >> 3);
|
||||
pkt = pkt->next; /* don't copy netif header */
|
||||
|
||||
while ((pkt != NULL) || (offset_count == offset)) { /* go to offset */
|
||||
while ((pkt != NULL) && (offset_count != offset)) { /* go to offset */
|
||||
offset_count += (uint16_t)pkt->size;
|
||||
|
||||
if (offset_count > offset) { /* we overshot */
|
||||
|
Loading…
Reference in New Issue
Block a user