From 0e5d8925d93eaa7d04f05a4c99505d9420279208 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 27 Jul 2007 20:09:37 +0000 Subject: [PATCH] r13946@catbus: nickm | 2007-07-27 16:09:31 -0400 Fix median_int for platforms where sizeof(int)!=sizeof(time_t) svn:r10949 --- src/or/dirvote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/or/dirvote.c b/src/or/dirvote.c index 2bc30231b3..e46e18e8f4 100644 --- a/src/or/dirvote.c +++ b/src/or/dirvote.c @@ -121,7 +121,7 @@ median_int(smartlist_t *ints) tor_assert(smartlist_len(ints)); smartlist_sort(ints, _compare_ints); idx = (smartlist_len(ints)-1)/2; - return *(time_t*)smartlist_get(ints, idx); + return *(int*)smartlist_get(ints, idx); } /** Given a vote vote (not a consensus!), return its associated