Browse Source

r13946@catbus: nickm | 2007-07-27 16:09:31 -0400
Fix median_int for platforms where sizeof(int)!=sizeof(time_t)


svn:r10949

Nick Mathewson 18 years ago
parent
commit
0e5d8925d9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/or/dirvote.c

+ 1 - 1
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 <b>vote</b> (not a consensus!), return its associated