From dc0d2f1c66e90f6966782def4a6072eb18561e24 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 20 Oct 2015 09:42:37 +0200 Subject: pkt_buff: Remove unused size member from struct pkt_buff The size member of struct pkt_buff is set but never accessed. It can savely be dropped as we can still get the size implicitly using pkt->tail - pkt->head if necessary. Signed-off-by: Tobias Klauser --- pkt_buff.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkt_buff.h b/pkt_buff.h index 30b999e..fecdb4c 100644 --- a/pkt_buff.h +++ b/pkt_buff.h @@ -14,10 +14,9 @@ struct pkt_buff { /* invariant: head <= data <= tail */ - uint8_t *head; - uint8_t *data; - uint8_t *tail; - unsigned int size; + uint8_t *head; + uint8_t *data; + uint8_t *tail; struct protocol *dissector; uint32_t link_type; @@ -31,7 +30,6 @@ static inline struct pkt_buff *pkt_alloc(uint8_t *packet, unsigned int len) pkt->head = packet; pkt->data = packet; pkt->tail = packet + len; - pkt->size = len; pkt->dissector = NULL; return pkt; -- cgit v1.2.3-54-g00ecf