1
0
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:
haukepetersen 2015-06-23 02:07:33 +02:00
parent 72e2187b75
commit a38d881424

View File

@ -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); hdr->offset = (uint8_t)(offset >> 3);
pkt = pkt->next; /* don't copy netif header */ 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; offset_count += (uint16_t)pkt->size;
if (offset_count > offset) { /* we overshot */ if (offset_count > offset) { /* we overshot */