gnrc_sixlowpan_iphc: fix last byte of iphc_hdr always being 0

Coverty scan found this:

> CID 298295 (#1 of 1): Operands don't affect result (CONSTANT_EXPRESSION_RESULT) result_independent_of_operands:
> (ipv6_hdr_get_fl(ipv6_hdr) & 255) >> 8 is 0 regardless of the values of its operands.

Looking at the code, this appears to be a copy & paste error from the previous line.
This commit is contained in:
Benjamin Valentin 2020-08-11 13:33:47 +02:00
parent a9a0671232
commit 2ed7f66d33

View File

@ -1033,9 +1033,9 @@ static size_t _iphc_ipv6_encode(gnrc_pktsnip_t *pkt,
iphc_hdr[inline_pos++] = (uint8_t)((ipv6_hdr_get_fl(ipv6_hdr) & 0x000f0000) >> 16);
}
/* copy remaining byteos of flow label */
/* copy remaining bytes of flow label */
iphc_hdr[inline_pos++] = (uint8_t)((ipv6_hdr_get_fl(ipv6_hdr) & 0x0000ff00) >> 8);
iphc_hdr[inline_pos++] = (uint8_t)((ipv6_hdr_get_fl(ipv6_hdr) & 0x000000ff) >> 8);
iphc_hdr[inline_pos++] = (uint8_t)(ipv6_hdr_get_fl(ipv6_hdr) & 0x000000ff);
}
/* check for compressible next header */