From e72948eb21d1da0275be1c6e0c7a9a22aa67a5e3 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sat, 4 Jun 2011 14:00:49 +0200 Subject: 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 --- net/batman-adv/gateway_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/batman-adv/gateway_common.c') diff --git a/net/batman-adv/gateway_common.c b/net/batman-adv/gateway_common.c index ed3bd366a2a..e74307be8e0 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, *tmp_ptr = '\0'; } - ret = strict_strtoul(buff, 10, &ldown); + ret = strict_strtol(buff, 10, &ldown); if (ret) { bat_err(net_dev, "Download speed of gateway mode invalid: %s\n", @@ -122,7 +122,7 @@ static bool parse_gw_bandwidth(struct net_device *net_dev, char *buff, *tmp_ptr = '\0'; } - ret = strict_strtoul(slash_ptr + 1, 10, &lup); + ret = strict_strtol(slash_ptr + 1, 10, &lup); if (ret) { bat_err(net_dev, "Upload speed of gateway mode invalid: " -- cgit v1.2.3-18-g5258