diff options
author | Sven Eckelmann <sven@narfation.org> | 2011-06-15 09:41:37 +0200 |
---|---|---|
committer | Sven Eckelmann <sven@narfation.org> | 2011-06-20 11:37:18 +0200 |
commit | b4e1705417c6cc7d46d9020259a2c8f457cf82bd (patch) | |
tree | d057a27c91d0bce396726878a6c8995f0d5b0d3b /net/batman-adv/gateway_common.c | |
parent | b2c44a53836559b5e2823aa215c979c33bc9e2db (diff) |
batman-adv: Reduce usage of char
char was used in different places to store information without really
using the characteristics of that data type or by ignoring the fact that
char has not a well defined signedness.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/gateway_common.c')
-rw-r--r-- | net/batman-adv/gateway_common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/batman-adv/gateway_common.c b/net/batman-adv/gateway_common.c index e74307be8e0c..18661af0bc3b 100644 --- a/net/batman-adv/gateway_common.c +++ b/net/batman-adv/gateway_common.c @@ -61,9 +61,9 @@ static void kbit_to_gw_bandwidth(int down, int up, long *gw_srv_class) /* returns the up and downspeeds in kbit, calculated from the class */ void gw_bandwidth_to_kbit(uint8_t gw_srv_class, int *down, int *up) { - char sbit = (gw_srv_class & 0x80) >> 7; - char dpart = (gw_srv_class & 0x78) >> 3; - char upart = (gw_srv_class & 0x07); + int sbit = (gw_srv_class & 0x80) >> 7; + int dpart = (gw_srv_class & 0x78) >> 3; + int upart = (gw_srv_class & 0x07); if (!gw_srv_class) { *down = 0; |