Use type cast to get rid of implicit sign extension
The size_t value here can be 64-bit and result in implicit sign extension. In this particular case, that gets masked out by host_to_be32(), so there is no practical difference, but it is better to get rid of the 64-bit variable explicitly.
This commit is contained in:
parent
f8b5f7dc6b
commit
74727a7b32
1 changed files with 1 additions and 1 deletions
|
@ -202,7 +202,7 @@ static u8 * eap_ttls_avp_hdr(u8 *avphdr, u32 avp_code, u32 vendor_id,
|
|||
}
|
||||
|
||||
avp->avp_code = host_to_be32(avp_code);
|
||||
avp->avp_length = host_to_be32((flags << 24) | (hdrlen + len));
|
||||
avp->avp_length = host_to_be32((flags << 24) | (u32) (hdrlen + len));
|
||||
|
||||
return avphdr + hdrlen;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue