diff options
author | Sven Eckelmann <sven@narfation.org> | 2011-06-04 08:00:49 -0400 |
---|---|---|
committer | Sven Eckelmann <sven@narfation.org> | 2011-06-09 14:40:38 -0400 |
commit | e72948eb21d1da0275be1c6e0c7a9a22aa67a5e3 (patch) | |
tree | d55325b914c76a663cd23873b2325c18d743e6af /net | |
parent | 6b9aadfa97efa5a73c005c5c4c667359a0c85bec (diff) |
batman-adv: Fix signedness problem in parse_gw_bandwidth
strict_strtoul as used in parse_gw_bandwidth is defined for unsigned
long and strict_strtol should be used instead for long.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/batman-adv/gateway_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/batman-adv/gateway_common.c b/net/batman-adv/gateway_common.c index ed3bd366a2a9..e74307be8e0c 100644 --- a/net/batman-adv/gateway_common.c +++ b/net/batman-adv/gateway_common.c | |||
@@ -97,7 +97,7 @@ static bool parse_gw_bandwidth(struct net_device *net_dev, char *buff, | |||
97 | *tmp_ptr = '\0'; | 97 | *tmp_ptr = '\0'; |
98 | } | 98 | } |
99 | 99 | ||
100 | ret = strict_strtoul(buff, 10, &ldown); | 100 | ret = strict_strtol(buff, 10, &ldown); |
101 | if (ret) { | 101 | if (ret) { |
102 | bat_err(net_dev, | 102 | bat_err(net_dev, |
103 | "Download speed of gateway mode invalid: %s\n", | 103 | "Download speed of gateway mode invalid: %s\n", |
@@ -122,7 +122,7 @@ static bool parse_gw_bandwidth(struct net_device *net_dev, char *buff, | |||
122 | *tmp_ptr = '\0'; | 122 | *tmp_ptr = '\0'; |
123 | } | 123 | } |
124 | 124 | ||
125 | ret = strict_strtoul(slash_ptr + 1, 10, &lup); | 125 | ret = strict_strtol(slash_ptr + 1, 10, &lup); |
126 | if (ret) { | 126 | if (ret) { |
127 | bat_err(net_dev, | 127 | bat_err(net_dev, |
128 | "Upload speed of gateway mode invalid: " | 128 | "Upload speed of gateway mode invalid: " |