diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-07-30 09:15:07 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-07-30 09:15:07 -0400 |
commit | efe966944d6f8fd4374ccc19b10adfe762034f47 (patch) | |
tree | ca115be02b923cbd1594a9872e83eebf8d71a70e /src | |
parent | 6bb10a28fb3f0286c61bc39b5fc2ced4aac43a95 (diff) | |
download | tor-efe966944d6f8fd4374ccc19b10adfe762034f47.tar.gz tor-efe966944d6f8fd4374ccc19b10adfe762034f47.zip |
Fix signed/unsigned comparison warnings in get_effective_bw(rate|burst)
Diffstat (limited to 'src')
-rw-r--r-- | src/or/config.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/config.c b/src/or/config.c index 9f9fef9d9a..cedd7f7529 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -1224,12 +1224,12 @@ options_need_geoip_info(or_options_t *options, const char **reason_out) int get_effective_bwrate(or_options_t *options) { - int bw = (int)options->BandwidthRate; + uint64_t bw = options->BandwidthRate; if (bw > options->MaxAdvertisedBandwidth) - bw = (int)options->MaxAdvertisedBandwidth; + bw = options->MaxAdvertisedBandwidth; if (options->RelayBandwidthRate > 0 && bw > options->RelayBandwidthRate) - bw = (int)options->RelayBandwidthRate; - return bw; + bw = options->RelayBandwidthRate; + return (int)bw; } /** Return the bandwidthburst that we are going to report to the authorities @@ -1237,10 +1237,10 @@ get_effective_bwrate(or_options_t *options) int get_effective_bwburst(or_options_t *options) { - int bw = (int)options->BandwidthBurst; + uint64_t bw = options->BandwidthBurst; if (options->RelayBandwidthBurst > 0 && bw > options->RelayBandwidthBurst) - bw = (int)options->RelayBandwidthBurst; - return bw; + bw = options->RelayBandwidthBurst; + return (int)bw; } /** Fetch the active option list, and take actions based on it. All of the |