diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/or/circuitstats.c | 8 | ||||
-rw-r--r-- | src/or/or.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/or/circuitstats.c b/src/or/circuitstats.c index ad0630e27e..923a6d794f 100644 --- a/src/or/circuitstats.c +++ b/src/or/circuitstats.c @@ -910,7 +910,7 @@ circuit_build_times_parse_state(circuit_build_times_t *cbt, int tot_values = 0; uint32_t loaded_cnt = 0, N = 0; config_line_t *line; - unsigned int i; + int i; build_time_t *loaded_times; int err = 0; circuit_build_times_init(cbt); @@ -960,8 +960,8 @@ circuit_build_times_parse_state(circuit_build_times_t *cbt, break; } - if (loaded_cnt+count+state->CircuitBuildAbandonedCount - > state->TotalBuildTimes) { + if (loaded_cnt+count+ (unsigned)state->CircuitBuildAbandonedCount + > (unsigned) state->TotalBuildTimes) { log_warn(LD_CIRC, "Too many build times in state file. " "Stopping short before %d", @@ -986,7 +986,7 @@ circuit_build_times_parse_state(circuit_build_times_t *cbt, loaded_times[loaded_cnt++] = CBT_BUILD_ABANDONED; } - if (loaded_cnt != state->TotalBuildTimes) { + if (loaded_cnt != (unsigned)state->TotalBuildTimes) { log_warn(LD_CIRC, "Corrupt state file? Build times count mismatch. " "Read %d times, but file says %d", loaded_cnt, diff --git a/src/or/or.h b/src/or/or.h index a90841fbcf..84913efc4d 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -4686,8 +4686,8 @@ typedef struct { /** Build time histogram */ config_line_t * BuildtimeHistogram; - unsigned int TotalBuildTimes; - unsigned int CircuitBuildAbandonedCount; + int TotalBuildTimes; + int CircuitBuildAbandonedCount; /** What version of Tor wrote this state file? */ char *TorVersion; |