Skip to content

Commit

Permalink
batman-adv: Fix signedness problem in parse_gw_bandwidth
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sven Eckelmann committed Jun 9, 2011
1 parent 6b9aadf commit e72948e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/batman-adv/gateway_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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: "
Expand Down

0 comments on commit e72948e

Please sign in to comment.