mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 19:28:04 +02:00
n-dhcp4: fix logging macro
The level can be a complex expression, don't use it directly in the
macro.
(cherry picked from commit 910267cf5f)
This commit is contained in:
parent
5abb14611b
commit
84c4920f5d
1 changed files with 3 additions and 2 deletions
|
|
@ -702,10 +702,11 @@ static inline uint64_t n_dhcp4_gettime(clockid_t clock) {
|
||||||
#define n_dhcp4_c_log(_config, _level, ...) \
|
#define n_dhcp4_c_log(_config, _level, ...) \
|
||||||
do { \
|
do { \
|
||||||
const NDhcp4ClientConfig *__config = _config; \
|
const NDhcp4ClientConfig *__config = _config; \
|
||||||
|
int __level = _level; \
|
||||||
\
|
\
|
||||||
if (_level <= __config->log.level && __config->log.func) { \
|
if (__level <= __config->log.level && __config->log.func) { \
|
||||||
if (1) { \
|
if (1) { \
|
||||||
_config->log.func(_level, \
|
_config->log.func(__level, \
|
||||||
__config->log.data, \
|
__config->log.data, \
|
||||||
__VA_ARGS__); \
|
__VA_ARGS__); \
|
||||||
} else { \
|
} else { \
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue