logging: use _nm_log() to avoid duplicate check of whether logging is enabled

Use _nm_log() in places that already checked whether logging
is enabled. No need to check again as done by nm_log().

(cherry picked from commit 4526b55a51)

Conflicts:
	src/nm-route-manager.c
This commit is contained in:
Thomas Haller 2015-04-22 11:12:29 +02:00
parent 6d8d567444
commit 65b074164e
2 changed files with 6 additions and 6 deletions

View file

@ -39,9 +39,9 @@
\
if ((self) != singleton_instance) \
g_snprintf (__prefix, sizeof (__prefix), "auth[%p]", (self)); \
nm_log ((level), (domain), \
"%s: " _NM_UTILS_MACRO_FIRST(__VA_ARGS__), \
__prefix _NM_UTILS_MACRO_REST(__VA_ARGS__)); \
_nm_log ((level), (domain), 0, \
"%s: " _NM_UTILS_MACRO_FIRST(__VA_ARGS__), \
__prefix _NM_UTILS_MACRO_REST(__VA_ARGS__)); \
} \
} G_STMT_END

View file

@ -76,9 +76,9 @@ static NMDefaultRouteManager *singleton_instance;
g_snprintf (__prefix, sizeof (__prefix), "default-route%c[%p]", __ch, (self)); \
else \
__prefix[STRLEN ("default-route")] = __ch; \
nm_log (__level, __domain, \
"%s: " _NM_UTILS_MACRO_FIRST(__VA_ARGS__), \
__prefix _NM_UTILS_MACRO_REST(__VA_ARGS__)); \
_nm_log (__level, __domain, 0, \
"%s: " _NM_UTILS_MACRO_FIRST(__VA_ARGS__), \
__prefix _NM_UTILS_MACRO_REST(__VA_ARGS__)); \
} \
} G_STMT_END