summaryrefslogtreecommitdiff
path: root/src/or/circuitmux_ewma.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/or/circuitmux_ewma.c
parent02fcb29d11abe9556ab4d118f2f89e557d1751dd (diff)
downloadtor-5ee6ca8da22ad8da94c829e6c02c05920742c364.tar.gz
tor-5ee6ca8da22ad8da94c829e6c02c05920742c364.zip
Switch to offsetof()
Diffstat (limited to 'src/or/circuitmux_ewma.c')
-rw-r--r--src/or/circuitmux_ewma.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/circuitmux_ewma.c b/src/or/circuitmux_ewma.c
index c2440b13f0..fde2d22a89 100644
--- a/src/or/circuitmux_ewma.c
+++ b/src/or/circuitmux_ewma.c
@@ -731,7 +731,7 @@ add_cell_ewma(ewma_policy_data_t *pol, cell_ewma_t *ewma)
smartlist_pqueue_add(pol->active_circuit_pqueue,
compare_cell_ewma_counts,
- STRUCT_OFFSET(cell_ewma_t, heap_index),
+ offsetof(cell_ewma_t, heap_index),
ewma);
}
@@ -746,7 +746,7 @@ remove_cell_ewma(ewma_policy_data_t *pol, cell_ewma_t *ewma)
smartlist_pqueue_remove(pol->active_circuit_pqueue,
compare_cell_ewma_counts,
- STRUCT_OFFSET(cell_ewma_t, heap_index),
+ offsetof(cell_ewma_t, heap_index),
ewma);
}
@@ -760,6 +760,6 @@ pop_first_cell_ewma(ewma_policy_data_t *pol)
return smartlist_pqueue_pop(pol->active_circuit_pqueue,
compare_cell_ewma_counts,
- STRUCT_OFFSET(cell_ewma_t, heap_index));
+ offsetof(cell_ewma_t, heap_index));
}