libsystemd-network: check that errno==0 is not passed to log functions

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-04-14 23:32:10 +02:00
parent a0c2541b6b
commit 00dd6d7770
9 changed files with 47 additions and 16 deletions
+7
View File
@@ -28,6 +28,13 @@
-ERRNO_VALUE(_e); \
})
#define log_interface_prefix_full_errno(prefix, ifname_expr, error, fmt, ...) \
({ \
int _error = (error); \
ASSERT_NON_ZERO(_error); \
log_interface_prefix_full_errno_zerook(prefix, ifname_expr, _error, fmt, ##__VA_ARGS__); \
})
/*
* The following macros append INTERFACE= to the message.
* The macros require a struct named 'Link' which contains 'char *ifname':