BUG/MINOR: channel: CHN_INFINITE_FORWARD must be unsigned
authorWilly Tarreau <w@1wt.eu>
Sat, 28 Dec 2013 18:16:26 +0000 (19:16 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 28 Dec 2013 20:33:37 +0000 (21:33 +0100)
This value is stored as unsigned in chn->to_forward. Having it defined
as signed makes it impossible to pass channel_forward() a previously
saved value because the argument will be zero-extended during the
conversion to long long, while the test will be performed using sign
extension. There is no impact on existing code right now.

include/types/channel.h

index 42160af..7f524c1 100644 (file)
 
 
 /* Magic value to forward infinite size (TCP, ...), used with ->to_forward */
-#define CHN_INFINITE_FORWARD    MAX_RANGE(int)
+#define CHN_INFINITE_FORWARD    MAX_RANGE(unsigned int)
 
 /* needed for a declaration below */
 struct session;