]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
r13946@catbus: nickm | 2007-07-27 16:09:31 -0400
authorNick Mathewson <nickm@torproject.org>
Fri, 27 Jul 2007 20:09:37 +0000 (20:09 +0000)
committerNick Mathewson <nickm@torproject.org>
Fri, 27 Jul 2007 20:09:37 +0000 (20:09 +0000)
 Fix median_int for platforms where sizeof(int)!=sizeof(time_t)

svn:r10949

src/or/dirvote.c

index 2bc30231b3674dec06bedf87c779611b7c09172e..e46e18e8f40da95079db2edc6d4b0faf42e1b7e0 100644 (file)
@@ -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 <b>vote</b> (not a consensus!), return its associated