diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2015-10-20 09:42:37 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2015-10-20 09:42:37 +0200 |
commit | dc0d2f1c66e90f6966782def4a6072eb18561e24 (patch) | |
tree | a3cc5c3c755985ecc96c1fe43e53a96193e80582 | |
parent | f5f002fd8966b78ece5b4e1757e639379619670a (diff) |
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 <tklauser@distanz.ch>
-rw-r--r-- | pkt_buff.h | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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; |