Commit 5dd6fcb9 authored by Thomas Haller's avatar Thomas Haller

core: minor cleanup of _NMLOG() macro in "src/nm-active-connection.c"

parent 24a7f88b
......@@ -120,12 +120,11 @@ static void _set_activation_type_managed (NMActiveConnection *self);
#define _NMLOG(level, ...) \
G_STMT_START { \
char _sbuf[64]; \
NMDevice *_device = (self) ? NM_ACTIVE_CONNECTION_GET_PRIVATE (self)->device : NULL; \
NMConnection *_applied_connection = _device ? NM_ACTIVE_CONNECTION_GET_PRIVATE (self)->applied_connection : NULL; \
NMActiveConnectionPrivate *_priv = self ? NM_ACTIVE_CONNECTION_GET_PRIVATE (self) : NULL; \
\
nm_log ((level), _NMLOG_DOMAIN, \
(_device) ? nm_device_get_iface (_device) : NULL, \
(_applied_connection) ? nm_connection_get_uuid (_applied_connection) : NULL, \
(_priv && _priv->device) ? nm_device_get_iface (_priv->device) : NULL, \
(_priv && _priv->applied_connection) ? nm_connection_get_uuid (_priv->applied_connection) : NULL, \
"%s%s: " _NM_UTILS_MACRO_FIRST (__VA_ARGS__), \
_NMLOG_PREFIX_NAME, \
self ? nm_sprintf_buf (_sbuf, "[%p]", self) : "" \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment