diff options
author | Stuart Haslam <stuart.haslam@arm.com> | 2014-06-02 18:10:01 +0100 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2014-06-10 11:19:00 -0700 |
commit | ac3af625e59510ed86e7320487fca6948d2c8e23 (patch) | |
tree | c59762f4c82d35ddd46214db418c1813d81b41b2 /include | |
parent | 26844e575d1c8d841835d7d9caa522bd86222460 (diff) |
Fix mismatched size of ODP_PACKET_OFFSET_INVALID
ODP_PACKET_OFFSET_INVALID is defined as ((size_t)-1) but the existing
implementations both store offsets using a uint32_t, which breaks things
in a few places on 64-bit systems. There's some explicit casting in the
implementations but it's not consistent and the odp_packet_l2/3/4
functions can return a junk ptr if packet parsing didn't get far enough
to set the offset correctly.
Signed-off-by: Stuart Haslam <stuart.haslam@arm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/odp_packet.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/odp_packet.h b/include/odp_packet.h index f7014fb6..932b0094 100644 --- a/include/odp_packet.h +++ b/include/odp_packet.h @@ -30,7 +30,7 @@ typedef uint32_t odp_packet_t; #define ODP_PACKET_INVALID ODP_BUFFER_INVALID /** Invalid offset */ -#define ODP_PACKET_OFFSET_INVALID ((size_t)-1) +#define ODP_PACKET_OFFSET_INVALID ((uint32_t)-1) /** |