diff options
author | teor <teor@torproject.org> | 2019-09-26 13:33:17 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-09-30 22:04:03 +1000 |
commit | 25c5322dfe228178391b37fffd3333abdf57baa5 (patch) | |
tree | 87f9ceedbb88e60f821a6612c2002669da505586 /src/lib/log/log.c | |
parent | 4c88ebcf4728084cad0a1f177eb9cdb107388581 (diff) | |
download | tor-25c5322dfe228178391b37fffd3333abdf57baa5.tar.gz tor-25c5322dfe228178391b37fffd3333abdf57baa5.zip |
log: Define count, boundary, and all macros for domains and flags
And do static checks on those macro definitions.
Part of 31854.
Diffstat (limited to 'src/lib/log/log.c')
-rw-r--r-- | src/lib/log/log.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/log/log.c b/src/lib/log/log.c index 994fdbdd9e..db4f154418 100644 --- a/src/lib/log/log.c +++ b/src/lib/log/log.c @@ -1337,7 +1337,9 @@ static const char *domain_list[] = { CTASSERT(ARRAY_LENGTH(domain_list) == N_LOGGING_DOMAINS + 1); -CTASSERT((UINT64_C(1)<<(N_LOGGING_DOMAINS-1)) < LOWEST_RESERVED_LD_FLAG_); +CTASSERT(HIGHEST_RESERVED_LD_DOMAIN_ < LD_ALL_DOMAINS); +CTASSERT(LD_ALL_DOMAINS < LOWEST_RESERVED_LD_FLAG_); +CTASSERT(LOWEST_RESERVED_LD_FLAG_ < LD_ALL_FLAGS); /** Return a bitmask for the log domain for which <b>domain</b> is the name, * or 0 if there is no such name. */ |