diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-11-27 12:17:07 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-12-01 13:45:06 +0100 |
commit | c0d1354b7da9ffc2923bc102abb67d03b655fbbf (patch) | |
tree | 5a92efd5d20c3459ef8e6b1cf0a7d6be061209f4 /src | |
parent | 3b7e00ce2215b742d9fdb1b8d4a4d76d349028c7 (diff) |
Macro hygiene
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/logging.hh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libutil/logging.hh b/src/libutil/logging.hh index ff17056f4..82ba54051 100644 --- a/src/libutil/logging.hh +++ b/src/libutil/logging.hh @@ -191,8 +191,9 @@ extern Verbosity verbosity; /* suppress msgs > this */ arguments are evaluated lazily. */ #define printMsg(level, args...) \ do { \ - if (level <= nix::verbosity) { \ - logger->log(level, fmt(args)); \ + auto __lvl = level; \ + if (__lvl <= nix::verbosity) { \ + logger->log(__lvl, fmt(args)); \ } \ } while (0) |