diff options
author | Thomas Haller <thaller@redhat.com> | 2016-05-16 16:17:09 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-05-16 16:22:27 +0200 |
commit | 95d323d1c754ba9f6be5474af37598e57f9da4dd (patch) | |
tree | 681fa8fc6292f2617541184b5a28d5d58f53a155 | |
parent | ae5d57e2b26f58c3c3396c5546412cef9eb0df6e (diff) | |
download | NetworkManager-95d323d1c754ba9f6be5474af37598e57f9da4dd.tar.gz |
ifcfg-rh: don't print warning in svGetValueInt64()
Having a simple accessor print warnings is not nice. At that point there
is no context as to why we are trying to read the value.
Note that the function already handles and expects invalid values, it's
just not clear that printing warnings from a utility function is the right
thing to do.
Just ignore such cases silently (at this point). It's up to the caller
to print a warning or whatever.
-rw-r--r-- | src/settings/plugins/ifcfg-rh/shvar.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/settings/plugins/ifcfg-rh/shvar.c b/src/settings/plugins/ifcfg-rh/shvar.c index 4e756349ca..4031692817 100644 --- a/src/settings/plugins/ifcfg-rh/shvar.c +++ b/src/settings/plugins/ifcfg-rh/shvar.c @@ -38,8 +38,6 @@ #include "nm-core-internal.h" -#define PARSE_WARNING(msg...) nm_log_warn (LOGD_SETTINGS, " " msg) - /* Open the file <name>, returning a shvarFile on success and NULL on failure. * Add a wrinkle to let the caller specify whether or not to create the file * (actually, return a structure anyway) if it doesn't exist. @@ -373,11 +371,10 @@ svGetValueInt64 (shvarFile *s, const char *key, guint base, gint64 min, gint64 m result = _nm_utils_ascii_str_to_int64 (tmp, base, min, max, fallback); errsv = errno; - if (errsv != 0) - PARSE_WARNING ("Error reading '%s' value '%s' as integer (%d)", key, tmp, errsv); g_free (tmp); + errno = errsv; return result; } |