ipv6_frag.c:modify the type of the parameters to solve runtime error

Signed-off-by: wangchen <wangchen41@xiaomi.com>
This commit is contained in:
wangchen
2024-08-23 15:23:19 +08:00
committed by Xiang Xiao
parent 74080e8659
commit 5fc016ef2d
+3 -2
View File
@@ -141,8 +141,9 @@ static int32_t ipv6_fragin_getinfo(FAR struct iob_s *iob,
fraglink->morefrags = fraglink->fragoff & 0x1;
fraglink->fragoff &= 0xfff8;
fraglink->fraglen = paylen;
fraglink->ipid = NTOHL((*(uint16_t *)(&fraghdr->id[0]) << 16) +
*(uint16_t *)(&fraghdr->id[2]));
fraglink->ipid = NTOHL(
((uint32_t)(*(FAR uint16_t *)(&fraghdr->id[0])) << 16) +
(uint32_t)(*(FAR uint16_t *)(&fraghdr->id[2])));
fraglink->frag = iob;