mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-15 05:11:32 +00:00
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>
This commit is contained in:
parent
6b9aadfa97
commit
e72948eb21
@ -97,7 +97,7 @@ static bool parse_gw_bandwidth(struct net_device *net_dev, char *buff,
|
|||||||
*tmp_ptr = '\0';
|
*tmp_ptr = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = strict_strtoul(buff, 10, &ldown);
|
ret = strict_strtol(buff, 10, &ldown);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
bat_err(net_dev,
|
bat_err(net_dev,
|
||||||
"Download speed of gateway mode invalid: %s\n",
|
"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';
|
*tmp_ptr = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = strict_strtoul(slash_ptr + 1, 10, &lup);
|
ret = strict_strtol(slash_ptr + 1, 10, &lup);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
bat_err(net_dev,
|
bat_err(net_dev,
|
||||||
"Upload speed of gateway mode invalid: "
|
"Upload speed of gateway mode invalid: "
|
||||||
|
Loading…
Reference in New Issue
Block a user