diff options
Diffstat (limited to 'src/nm-active-connection.c')
-rw-r--r-- | src/nm-active-connection.c | 7 |
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) : "" \ |