diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2020-02-18 17:04:37 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2020-02-24 14:58:24 +0100 |
commit | 910267cf5f0f163a038ec983bec237c8a8cb1abf (patch) | |
tree | ef77c6566d5b92ce1c0dafef69c457aabbbf1ab5 /shared/n-dhcp4 | |
parent | 9f2014ac64b784374d8de64efe66339fa887887f (diff) | |
download | NetworkManager-910267cf5f0f163a038ec983bec237c8a8cb1abf.tar.gz |
n-dhcp4: fix logging macro
The level can be a complex expression, don't use it directly in the
macro.
Diffstat (limited to 'shared/n-dhcp4')
-rw-r--r-- | shared/n-dhcp4/src/n-dhcp4-private.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/shared/n-dhcp4/src/n-dhcp4-private.h b/shared/n-dhcp4/src/n-dhcp4-private.h index 436ee8065c..f647cb5e2b 100644 --- a/shared/n-dhcp4/src/n-dhcp4-private.h +++ b/shared/n-dhcp4/src/n-dhcp4-private.h @@ -702,10 +702,11 @@ static inline uint64_t n_dhcp4_gettime(clockid_t clock) { #define n_dhcp4_c_log(_config, _level, ...) \ do { \ 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) { \ - _config->log.func(_level, \ + _config->log.func(__level, \ __config->log.data, \ __VA_ARGS__); \ } else { \ |