utils: fix error logging in ASSERT_VALID_PATH_COMPONENT()

(cherry picked from commit 43a50fd5f2)
This commit is contained in:
Jiří Klimeš 2015-06-12 21:46:46 +02:00
parent 65a585beba
commit 1111b867ce

View file

@ -2660,11 +2660,10 @@ ASSERT_VALID_PATH_COMPONENT (const char *name)
return name;
fail:
if (name)
nm_log_err (LOGD_CORE, "Failed asserting path component: NULL");
else
nm_log_err (LOGD_CORE, "Failed asserting path component: \"%s\"", name);
g_error ("FATAL: Failed asserting path component: %s", name ? name : "(null)");
nm_log_err (LOGD_CORE, "Failed asserting path component: %s%s%s",
NM_PRINT_FMT_QUOTED (name, "\"", name, "\"", "(null)"));
g_error ("FATAL: Failed asserting path component: %s%s%s",
NM_PRINT_FMT_QUOTED (name, "\"", name, "\"", "(null)"));
g_assert_not_reached ();
}