Skip to content

Commit

Permalink
Fix a signed/unsigned compile warning in 0.2.1.19
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger Dingledine committed Jul 28, 2009
1 parent 69706f9 commit 6249b0f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
Changes in version 0.2.1.20 - 2009-??-??
o Minor bugfixes:
- Fix a signed/unsigned compile warning in 0.2.1.19.


Changes in version 0.2.1.19 - 2009-07-28
o Major bugfixes:
- Make accessing hidden services on 0.2.1.x work right
Expand Down
8 changes: 4 additions & 4 deletions src/or/config.c
Expand Up @@ -1224,10 +1224,10 @@ options_need_geoip_info(or_options_t *options, const char **reason_out)

/** Return the bandwidthrate that we are going to report to the authorities
* based on the config options. */
int
uint32_t
get_effective_bwrate(or_options_t *options)
{
int bw = (int)options->BandwidthRate;
uint32_t bw = (int)options->BandwidthRate;
if (bw > options->MaxAdvertisedBandwidth)
bw = (int)options->MaxAdvertisedBandwidth;
if (options->RelayBandwidthRate > 0 && bw > options->RelayBandwidthRate)
Expand All @@ -1237,10 +1237,10 @@ get_effective_bwrate(or_options_t *options)

/** Return the bandwidthburst that we are going to report to the authorities
* based on the config options. */
int
uint32_t
get_effective_bwburst(or_options_t *options)
{
int bw = (int)options->BandwidthBurst;
uint32_t bw = (int)options->BandwidthBurst;
if (options->RelayBandwidthBurst > 0 && bw > options->RelayBandwidthBurst)
bw = (int)options->RelayBandwidthBurst;
return bw;
Expand Down
4 changes: 2 additions & 2 deletions src/or/or.h
Expand Up @@ -2926,8 +2926,8 @@ int options_need_geoip_info(or_options_t *options, const char **reason_out);
int getinfo_helper_config(control_connection_t *conn,
const char *question, char **answer);

int get_effective_bwrate(or_options_t *options);
int get_effective_bwburst(or_options_t *options);
uint32_t get_effective_bwrate(or_options_t *options);
uint32_t get_effective_bwburst(or_options_t *options);

#ifdef CONFIG_PRIVATE
/* Used only by config.c and test.c */
Expand Down

0 comments on commit 6249b0f

Please sign in to comment.