summaryrefslogtreecommitdiff
path: root/src/common/crypto.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/crypto.c
parent02fcb29d11abe9556ab4d118f2f89e557d1751dd (diff)
downloadtor-5ee6ca8da22ad8da94c829e6c02c05920742c364.tar.gz
tor-5ee6ca8da22ad8da94c829e6c02c05920742c364.zip
Switch to offsetof()
Diffstat (limited to 'src/common/crypto.c')
-rw-r--r--src/common/crypto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index c258f239a8..4d6a70bc49 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -1884,7 +1884,7 @@ crypto_digest_alloc_bytes(digest_algorithm_t alg)
/* Helper: returns the number of bytes in the 'f' field of 'st' */
#define STRUCT_FIELD_SIZE(st, f) (sizeof( ((st*)0)->f ))
/* Gives the length of crypto_digest_t through the end of the field 'd' */
-#define END_OF_FIELD(f) (STRUCT_OFFSET(crypto_digest_t, f) + \
+#define END_OF_FIELD(f) (offsetof(crypto_digest_t, f) + \
STRUCT_FIELD_SIZE(crypto_digest_t, f))
switch (alg) {
case DIGEST_SHA1: