core: minor code cleanup to use preprocessor constants

Use preprocessor constants in nm_logging_all_domains_to_string instead
of hard coded values for the special logging domain names.

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller
2013-07-27 12:43:53 +02:00
committed by Dan Williams
parent 4861161bd4
commit a853b3bd23

View File

@@ -260,16 +260,16 @@ nm_logging_all_domains_to_string (void)
if (G_UNLIKELY (!str)) {
const LogDesc *diter;
str = g_string_new ("DEFAULT");
str = g_string_new (LOGD_DEFAULT_STRING);
for (diter = &domain_descs[0]; diter->name; diter++) {
g_string_append_c (str, ',');
g_string_append (str, diter->name);
if (diter->num == LOGD_DHCP6)
g_string_append (str, ",DHCP");
g_string_append (str, "," LOGD_DHCP_STRING);
else if (diter->num == LOGD_IP6)
g_string_append (str, ",IP");
g_string_append (str, "," LOGD_IP_STRING);
}
g_string_append (str, ",ALL");
g_string_append (str, "," LOGD_ALL_STRING);
}
return str->str;