mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-14 07:30:31 +01:00
Use strtol not atoi (David Cantrell <dcantrell@redhat.com>) rh #447776
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3776 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
b0cf66eda8
commit
518095511e
1 changed files with 6 additions and 1 deletions
|
|
@ -1015,7 +1015,12 @@ nm_dhcp_manager_get_ip4_config (NMDHCPManager *manager,
|
|||
|
||||
str = g_hash_table_lookup (device->options, "new_interface_mtu");
|
||||
if (str) {
|
||||
int int_mtu = atoi (str);
|
||||
int int_mtu;
|
||||
|
||||
errno = 0;
|
||||
int_mtu = strtol (str, NULL, 10);
|
||||
if ((errno == EINVAL) || (errno == ERANGE))
|
||||
goto error;
|
||||
|
||||
if (int_mtu)
|
||||
nm_ip4_config_set_mtu (ip4_config, int_mtu);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue