diff options
author | Neel Chauhan <neel@neelc.org> | 2017-07-31 19:30:30 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-08-03 08:56:35 -0400 |
commit | 5ee6ca8da22ad8da94c829e6c02c05920742c364 (patch) | |
tree | 4e69b0cc5f825f316aa05b290d2340c94e46c3ea /src/or/dircollate.c | |
parent | 02fcb29d11abe9556ab4d118f2f89e557d1751dd (diff) | |
download | tor-5ee6ca8da22ad8da94c829e6c02c05920742c364.tar.gz tor-5ee6ca8da22ad8da94c829e6c02c05920742c364.zip |
Switch to offsetof()
Diffstat (limited to 'src/or/dircollate.c')
-rw-r--r-- | src/or/dircollate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/dircollate.c b/src/or/dircollate.c index 172364c5f5..d34ebe8af5 100644 --- a/src/or/dircollate.c +++ b/src/or/dircollate.c @@ -53,7 +53,7 @@ ddmap_entry_free(ddmap_entry_t *e) static ddmap_entry_t * ddmap_entry_new(int n_votes) { - return tor_malloc_zero(STRUCT_OFFSET(ddmap_entry_t, vrs_lst) + + return tor_malloc_zero(offsetof(ddmap_entry_t, vrs_lst) + sizeof(vote_routerstatus_t *) * n_votes); } |