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:

committed by
Dan Williams

parent
4861161bd4
commit
a853b3bd23
@@ -260,16 +260,16 @@ nm_logging_all_domains_to_string (void)
|
|||||||
if (G_UNLIKELY (!str)) {
|
if (G_UNLIKELY (!str)) {
|
||||||
const LogDesc *diter;
|
const LogDesc *diter;
|
||||||
|
|
||||||
str = g_string_new ("DEFAULT");
|
str = g_string_new (LOGD_DEFAULT_STRING);
|
||||||
for (diter = &domain_descs[0]; diter->name; diter++) {
|
for (diter = &domain_descs[0]; diter->name; diter++) {
|
||||||
g_string_append_c (str, ',');
|
g_string_append_c (str, ',');
|
||||||
g_string_append (str, diter->name);
|
g_string_append (str, diter->name);
|
||||||
if (diter->num == LOGD_DHCP6)
|
if (diter->num == LOGD_DHCP6)
|
||||||
g_string_append (str, ",DHCP");
|
g_string_append (str, "," LOGD_DHCP_STRING);
|
||||||
else if (diter->num == LOGD_IP6)
|
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;
|
return str->str;
|
||||||
|
Reference in New Issue
Block a user