GNOME Bugzilla – Bug 766518
[review] ifcfg-rh cleanup [th/ifcfg-rh-cleanup-bgo766518]
Last modified: 2016-05-17 10:31:27 UTC
- replace use of strtol() - #include - logging
> ifcfg-rh: use _nm_utils_ascii_str_to_int64() in reader's get_uint()/get_int() functions static gboolean get_uint (const char *str, guint32 *value) { ... + tmp = _nm_utils_ascii_str_to_int64 (str, 0, 0, G_MAXINT32, -1); G_MAXUINT32 ? > ifcfg-rh: replace uses of get_int() + priority = _nm_utils_ascii_str_to_int64 (val, 0, 0, 7, -1); + if (priority < 0) { g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION, "Invalid %s value '%s' (expected 0 - 7)", tmp, val); Set "success = FALSE" here? Otherwise LGTM.
fixed and merged: master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=54474993fda660e9c75c80e52c685c7aad05d61d Thank you.