commit 16cf1679e78c690869be3d26448a965e8d1330b0 Author: Yawning Angel yawning@schwanenlied.me Date: Fri Feb 6 16:26:28 2015 +0000
Fix scheduler compilation on targets where char is unsigned.
Per discussion with nickm, the `dir` argument should be a int rather than a signed char.
Fixes bug #14764. --- changes/bug14764 | 4 ++++ src/or/scheduler.c | 2 +- src/or/scheduler.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/changes/bug14764 b/changes/bug14764 new file mode 100644 index 0000000..b05ff69 --- /dev/null +++ b/changes/bug14764 @@ -0,0 +1,4 @@ + o Minor bugfixes (portability): + - Fix scheduler compilation on targets where char is unsigned. + Fixes bug 14764; bugfix on 0.2.6.2-alpha. Reported by Christian + Kujau. diff --git a/src/or/scheduler.c b/src/or/scheduler.c index f3fbc4a..931bb6b 100644 --- a/src/or/scheduler.c +++ b/src/or/scheduler.c @@ -613,7 +613,7 @@ scheduler_touch_channel(channel_t *chan) */
void -scheduler_adjust_queue_size(channel_t *chan, char dir, uint64_t adj) +scheduler_adjust_queue_size(channel_t *chan, int dir, uint64_t adj) { time_t now = approx_time();
diff --git a/src/or/scheduler.h b/src/or/scheduler.h index 70f6a39..27dd2d8 100644 --- a/src/or/scheduler.h +++ b/src/or/scheduler.h @@ -29,7 +29,7 @@ void scheduler_channel_wants_writes(channel_t *chan); MOCK_DECL(void,scheduler_release_channel,(channel_t *chan));
/* Notify scheduler of queue size adjustments */ -void scheduler_adjust_queue_size(channel_t *chan, char dir, uint64_t adj); +void scheduler_adjust_queue_size(channel_t *chan, int dir, uint64_t adj);
/* Notify scheduler that a channel's queue position may have changed */ void scheduler_touch_channel(channel_t *chan);
tor-commits@lists.torproject.org