summaryrefslogtreecommitdiff
path: root/epan/wmem
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-08-08 12:23:23 +0000
committerEvan Huus <eapache@gmail.com>2013-08-08 12:23:23 +0000
commitc5319ebc93f82eef68174881904526314c891faf (patch)
tree24215ec36517b7581396f831bec2bc304a1e0c7e /epan/wmem
parent0ebe18dcea619cad481056cb2b69b1d3c3856e24 (diff)
downloadwireshark-c5319ebc93f82eef68174881904526314c891faf.tar.gz
One more chunk header alignment fix.
svn path=/trunk/; revision=51218
Diffstat (limited to 'epan/wmem')
-rw-r--r--epan/wmem/wmem_allocator_block.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/wmem/wmem_allocator_block.c b/epan/wmem/wmem_allocator_block.c
index 22c4cbb38f..810f9de190 100644
--- a/epan/wmem/wmem_allocator_block.c
+++ b/epan/wmem/wmem_allocator_block.c
@@ -175,8 +175,8 @@ typedef struct _wmem_block_chunk_t {
#define WMEM_CHUNK_HEADER_SIZE WMEM_ALIGN_SIZE(sizeof(wmem_block_chunk_t))
/* other handy chunk macros */
-#define WMEM_CHUNK_TO_DATA(CHUNK) ((void*)((CHUNK) + 1))
-#define WMEM_DATA_TO_CHUNK(DATA) (((wmem_block_chunk_t*)(DATA)) - 1)
+#define WMEM_CHUNK_TO_DATA(CHUNK) ((void*)((guint8*)(CHUNK) + WMEM_CHUNK_HEADER_SIZE))
+#define WMEM_DATA_TO_CHUNK(DATA) ((wmem_block_chunk_t*)((guint8*)(DATA) - WMEM_CHUNK_HEADER_SIZE))
#define WMEM_CHUNK_DATA_LEN(CHUNK) ((CHUNK)->len - WMEM_CHUNK_HEADER_SIZE)
/* This is what the 'data' section of a chunk contains if it is free. */