diff options
author | Jere Leppänen <jere.leppanen@nokia.com> | 2022-08-17 12:57:48 +0300 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2022-09-09 10:24:07 +0300 |
commit | 5b37da53391f68f1327567fbae04adbbe1d64a72 (patch) | |
tree | c5f8a055a19abdc54a004f639448c95bd353c3a9 /helper | |
parent | 65a7f559c173ddbe9738c9c03bf9dbfc52279bc0 (diff) |
helper: ip: avoid conversion warning in odph_ipv4_csum()
Use an explicit cast to avoid conversion warning in odph_ipv4_csum(),
when application is compiled with -Wconversion option.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'helper')
-rw-r--r-- | helper/include/odp/helper/ip.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helper/include/odp/helper/ip.h b/helper/include/odp/helper/ip.h index 3fac438f1..e0a7e63fe 100644 --- a/helper/include/odp/helper/ip.h +++ b/helper/include/odp/helper/ip.h @@ -120,7 +120,7 @@ static inline int odph_ipv4_csum(odp_packet_t pkt, ip->chksum = 0; memcpy(buf, ip, sizeof(*ip)); res = odp_packet_copy_to_mem(pkt, offset + sizeof(*ip), - nleft - sizeof(*ip), + nleft - (uint32_t)sizeof(*ip), buf + sizeof(*ip) / 2); if (odp_unlikely(res < 0)) return res; |