diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2015-02-06 18:53:09 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2015-02-06 18:53:09 +0100 |
commit | 3d228074abb4b41e30dd7e8266f87f967b304ba8 (patch) | |
tree | 00c33859bcae42704292e20b7048d06f50aa52c8 | |
parent | 70d3f132f12423a43ee5454f747f58fdde4dfb8e (diff) |
pkt: Fix tail pointer initialization error
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r-- | pkt.h | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -47,10 +47,7 @@ static inline struct pkt *pkt_alloc(size_t size) struct pkt *p = xmalloc(sizeof(*q) + size); uint8_t *data = (uint8_t *)p + sizeof(*p); - p->head = data; - p->data = data; - p->tail = data + size; - p->size = size; + p->head = p->data = p->tail = data; return p; } |