After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 766518 - [review] ifcfg-rh cleanup [th/ifcfg-rh-cleanup-bgo766518]
[review] ifcfg-rh cleanup [th/ifcfg-rh-cleanup-bgo766518]
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-05-16 14:36 UTC by Thomas Haller
Modified: 2016-05-17 10:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Haller 2016-05-16 14:36:45 UTC
- replace use of strtol()

- #include

- logging
Comment 1 Beniamino Galvani 2016-05-17 09:45:52 UTC
> 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.