diff options
author | Thomas Haller <thaller@redhat.com> | 2016-02-13 16:08:40 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-02-21 18:31:39 +0100 |
commit | d22b3fabc5e928254436935072ce600bc1c7c983 (patch) | |
tree | a9172a90cb0998b57acf9436239ce139fe3caa23 /src/main.c | |
parent | a51a1cde3621d682bc70e8771d48a8af797bd24e (diff) | |
download | NetworkManager-d22b3fabc5e928254436935072ce600bc1c7c983.tar.gz |
core: use nm_utils_parse_debug_string() instead of g_parse_debug_string()
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/main.c b/src/main.c index 12baed1fd9..9495a9eff1 100644 --- a/src/main.c +++ b/src/main.c @@ -164,17 +164,11 @@ _init_nm_debug (const char *debug) { "RLIMIT_CORE", D_RLIMIT_CORE }, { "fatal-warnings", D_FATAL_WARNINGS }, }; - guint flags = 0; + guint flags; const char *env = getenv ("NM_DEBUG"); - if (env && strcasecmp (env, "help") != 0) { - /* g_parse_debug_string() prints options to stderr if the variable - * is set to "help". Don't allow that. */ - flags = g_parse_debug_string (env, keys, G_N_ELEMENTS (keys)); - } - - if (debug && strcasecmp (debug, "help") != 0) - flags |= g_parse_debug_string (debug, keys, G_N_ELEMENTS (keys)); + flags = nm_utils_parse_debug_string (env, keys, G_N_ELEMENTS (keys)); + flags |= nm_utils_parse_debug_string (debug, keys, G_N_ELEMENTS (keys)); if (NM_FLAGS_HAS (flags, D_RLIMIT_CORE)) { /* only enable this, if explicitly requested, because it might |