Skip to content

Commit

Permalink
Fix compiler warning about signed/unsigned conversion.
Browse files Browse the repository at this point in the history
```
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
  • Loading branch information
asn-d6 committed Mar 17, 2021
1 parent 29f07a4 commit 80da176
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/feature/stats/rephist.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 80da176

Please sign in to comment.