commit be778a65dfd85c34481af32fcfb0338522bacd1e Author: Nick Mathewson nickm@torproject.org Date: Tue Mar 28 21:41:59 2017 +0200
Fix i386 compilation from spooling patch. I seem to be good at breaking that. --- src/or/dirserv.c | 7 ++++--- src/or/dirserv.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index b78af30..0e899a7 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -3661,7 +3661,7 @@ void dirserv_spool_remove_missing_and_guess_size(dir_connection_t *conn, time_t cutoff, int compression, - uint64_t *size_out, + size_t *size_out, int *n_expired_out) { if (BUG(!conn)) @@ -3693,8 +3693,9 @@ dirserv_spool_remove_missing_and_guess_size(dir_connection_t *conn, } } SMARTLIST_FOREACH_END(spooled);
- if (size_out) - *size_out = total; + if (size_out) { + *size_out = (total > SIZE_MAX) ? SIZE_MAX : (size_t)total; + } if (n_expired_out) *n_expired_out = n_expired; } diff --git a/src/or/dirserv.h b/src/or/dirserv.h index 4bc31d8..f707237 100644 --- a/src/or/dirserv.h +++ b/src/or/dirserv.h @@ -188,7 +188,7 @@ void spooled_resource_free(spooled_resource_t *spooled); void dirserv_spool_remove_missing_and_guess_size(dir_connection_t *conn, time_t cutoff, int compression, - uint64_t *size_out, + size_t *size_out, int *n_expired_out); void dirserv_spool_sort(dir_connection_t *conn); void dir_conn_clear_spool(dir_connection_t *conn);
tor-commits@lists.torproject.org