r13946@catbus: nickm | 2007-07-27 16:09:31 -0400

Fix median_int for platforms where sizeof(int)!=sizeof(time_t)


svn:r10949
This commit is contained in:
Nick Mathewson 2007-07-27 20:09:37 +00:00
parent a5477c7bb9
commit 0e5d8925d9

View 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