summaryrefslogtreecommitdiffstats
path: root/src/libsystemd-network/dhcp6-internal.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-04-14 23:12:50 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-04-14 23:32:07 +0200
commita0c2541b6bd38fcfd8282a5f86d6366fbd20d614 (patch)
treef9f67a2dba4781af17ffe887936ca9829c8b7844 /src/libsystemd-network/dhcp6-internal.h
parentCheck that errno passed log_{interface,link}_*_errno() is non-zero (diff)
downloadsystemd-a0c2541b6bd38fcfd8282a5f86d6366fbd20d614.tar.xz
systemd-a0c2541b6bd38fcfd8282a5f86d6366fbd20d614.zip
libsystemd-network: use macro for definitions of log_{lldp,dhcp,…}_errno
No functional change.
Diffstat (limited to 'src/libsystemd-network/dhcp6-internal.h')
-rw-r--r--src/libsystemd-network/dhcp6-internal.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/libsystemd-network/dhcp6-internal.h b/src/libsystemd-network/dhcp6-internal.h
index 26897404fe..2b61a7bb3b 100644
--- a/src/libsystemd-network/dhcp6-internal.h
+++ b/src/libsystemd-network/dhcp6-internal.h
@@ -119,15 +119,10 @@ int dhcp6_message_type_from_string(const char *s) _pure_;
const char *dhcp6_message_status_to_string(int s) _const_;
int dhcp6_message_status_from_string(const char *s) _pure_;
-#define log_dhcp6_client_errno(client, error, fmt, ...) \
- ({ \
- int _e = (error); \
- if (DEBUG_LOGGING) \
- log_interface_full_errno_zerook( \
- sd_dhcp6_client_get_ifname(client), \
- LOG_DEBUG, _e, "DHCPv6 client: " fmt, \
- ##__VA_ARGS__); \
- -ERRNO_VALUE(_e); \
- })
-#define log_dhcp6_client(client, fmt, ...) \
+#define log_dhcp6_client_errno(client, error, fmt, ...) \
+ log_interface_prefix_full_errno_zerook( \
+ "DHCPv6 client: ", \
+ sd_dhcp6_client_get_ifname(client), \
+ error, fmt, ##__VA_ARGS__)
+#define log_dhcp6_client(client, fmt, ...) \
log_dhcp6_client_errno(client, 0, fmt, ##__VA_ARGS__)