summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-09-26 12:55:34 +0200
committerThomas Haller <thaller@redhat.com>2017-10-05 11:50:31 +0200
commit5dd6fcb970ebea5f9c1b986735b8adc75f34c2a6 (patch)
treedbb96a768fe7a82d5fae5a09697a8434b2477037
parent24a7f88bc56b66745c1e6b9444df8a80125de059 (diff)
downloadNetworkManager-5dd6fcb970ebea5f9c1b986735b8adc75f34c2a6.tar.gz
core: minor cleanup of _NMLOG() macro in "src/nm-active-connection.c"
-rw-r--r--src/nm-active-connection.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c
index 862754f9b5..610c6e4c64 100644
--- a/src/nm-active-connection.c
+++ b/src/nm-active-connection.c
@@ -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) : "" \