]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix scheduler compilation on targets where char is unsigned.
authorYawning Angel <yawning@schwanenlied.me>
Fri, 6 Feb 2015 16:26:28 +0000 (16:26 +0000)
committerYawning Angel <yawning@schwanenlied.me>
Fri, 6 Feb 2015 16:26:28 +0000 (16:26 +0000)
Per discussion with nickm, the `dir` argument should be a int rather
than a signed char.

Fixes bug #14764.

changes/bug14764 [new file with mode: 0644]
src/or/scheduler.c
src/or/scheduler.h

diff --git a/changes/bug14764 b/changes/bug14764
new file mode 100644 (file)
index 0000000..b05ff69
--- /dev/null
@@ -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.
index f3fbc4ad4ec2acba24707503b63eecaf5f586ca4..931bb6b7443b61b79550ceb312669794307b85e0 100644 (file)
@@ -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();
 
index 70f6a39d4cd4a4934e541cd6155483cf4a3531fb..27dd2d83883a0d01b22dee2b15cf9294cbea9942 100644 (file)
@@ -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);