diff options
author | George Kadianakis <desnacked@riseup.net> | 2021-03-17 20:03:39 +0200 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2021-03-17 20:03:39 +0200 |
commit | 80da1761a624686e25223b64f5832eab9249568b (patch) | |
tree | c03b8ced405667b557504666b9e051d6ca96ed29 /src | |
parent | 29f07a4e9d2e7cd061e696f673c42e00885ec231 (diff) | |
download | tor-80da1761a624686e25223b64f5832eab9249568b.tar.gz tor-80da1761a624686e25223b64f5832eab9249568b.zip |
Fix compiler warning about signed/unsigned conversion.
```
src/feature/stats/rephist.c: In function ‘overload_happened_recently’:
src/feature/stats/rephist.c:215:21: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (overload_time > approx_time() - 3600 * n_hours) {
```
from https://gitlab.torproject.org/tpo/core/tor/-/issues/40341#note_2729364
Diffstat (limited to 'src')
-rw-r--r-- | src/feature/stats/rephist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/feature/stats/rephist.c b/src/feature/stats/rephist.c index fb97e0d255..7c0c28804c 100644 --- a/src/feature/stats/rephist.c +++ b/src/feature/stats/rephist.c @@ -209,7 +209,7 @@ static overload_stats_t overload_stats; /** Return true if this overload happened within the last `n_hours`. */ static bool -overload_happened_recently(time_t overload_time, unsigned n_hours) +overload_happened_recently(time_t overload_time, int n_hours) { /* An overload is relevant if it happened in the last 72 hours */ if (overload_time > approx_time() - 3600 * n_hours) { |