From 17317a758132ac9996eeed2c90c1b2477da99d57 Mon Sep 17 00:00:00 2001 From: Petri Savolainen Date: Wed, 25 Jun 2014 17:35:00 +0300 Subject: Buffer header C99 compliance and cleanup Fixed C99 compliance bug in buffer header (removed the empty array). Cleaned and harmonized buffer pool implementation for different buffer types. Signed-off-by: Petri Savolainen --- platform/linux-generic/include/odp_packet_internal.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'platform/linux-generic/include/odp_packet_internal.h') diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h index eb978a3e9..45ed41254 100644 --- a/platform/linux-generic/include/odp_packet_internal.h +++ b/platform/linux-generic/include/odp_packet_internal.h @@ -115,11 +115,10 @@ typedef struct { odp_pktio_t input; uint32_t pad; - uint8_t payload[]; - + uint8_t buf_data[]; /* start of buffer data area */ } odp_packet_hdr_t; -ODP_ASSERT(sizeof(odp_packet_hdr_t) == ODP_OFFSETOF(odp_packet_hdr_t, payload), +ODP_ASSERT(sizeof(odp_packet_hdr_t) == ODP_OFFSETOF(odp_packet_hdr_t, buf_data), ODP_PACKET_HDR_T__SIZE_ERR); ODP_ASSERT(sizeof(odp_packet_hdr_t) % sizeof(uint64_t) == 0, ODP_PACKET_HDR_T__SIZE_ERR2); -- cgit v1.2.3