libsystemd-network: use macro for definitions of log_{lldp,dhcp,…}_errno

No functional change.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-04-14 23:32:07 +02:00
parent f407219cd1
commit a0c2541b6b
9 changed files with 55 additions and 84 deletions
+11
View File
@@ -17,6 +17,17 @@
log_interface_full_errno_zerook(ifname, level, _error, __VA_ARGS__); \
})
#define log_interface_prefix_full_errno_zerook(prefix, ifname_expr, error, fmt, ...) \
({ \
int _e = (error); \
if (DEBUG_LOGGING) \
log_interface_full_errno_zerook( \
ifname_expr, \
LOG_DEBUG, _e, prefix fmt, \
##__VA_ARGS__); \
-ERRNO_VALUE(_e); \
})
/*
* The following macros append INTERFACE= to the message.
* The macros require a struct named 'Link' which contains 'char *ifname':