aboutsummaryrefslogtreecommitdiff
path: root/src/common/memarea.c
diff options
context:
space:
mode:
authorNeel Chauhan <neel@neelc.org>2017-07-31 19:30:30 -0400
committerNick Mathewson <nickm@torproject.org>2017-08-03 08:56:35 -0400
commit5ee6ca8da22ad8da94c829e6c02c05920742c364 (patch)
tree4e69b0cc5f825f316aa05b290d2340c94e46c3ea /src/common/memarea.c
parent02fcb29d11abe9556ab4d118f2f89e557d1751dd (diff)
downloadtor-5ee6ca8da22ad8da94c829e6c02c05920742c364.tar.gz
tor-5ee6ca8da22ad8da94c829e6c02c05920742c364.zip
Switch to offsetof()
Diffstat (limited to 'src/common/memarea.c')
-rw-r--r--src/common/memarea.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/memarea.c b/src/common/memarea.c
index 659d1edf54..4e2a5e5fc5 100644
--- a/src/common/memarea.c
+++ b/src/common/memarea.c
@@ -7,6 +7,7 @@
*/
#include "orconfig.h"
+#include <stddef.h>
#include <stdlib.h>
#include "memarea.h"
#include "util.h"
@@ -101,7 +102,7 @@ typedef struct memarea_chunk_t {
/** How many bytes are needed for overhead before we get to the memory part
* of a chunk? */
-#define CHUNK_HEADER_SIZE STRUCT_OFFSET(memarea_chunk_t, U_MEM)
+#define CHUNK_HEADER_SIZE offsetof(memarea_chunk_t, U_MEM)
/** What's the smallest that we'll allocate a chunk? */
#define CHUNK_SIZE 4096