diff options
author | teor <teor@torproject.org> | 2019-09-25 16:35:02 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-09-25 16:40:09 +1000 |
commit | d30a042fa8348028e0bea6f3e46cba1ffbe5adcc (patch) | |
tree | 706db85bbdfb07452dddced9e5fd4c2bc26e24d1 /src/test/testing_common.c | |
parent | 1ad1e84b17267f04960b322effaf57ea8a9690c0 (diff) | |
download | tor-d30a042fa8348028e0bea6f3e46cba1ffbe5adcc.tar.gz tor-d30a042fa8348028e0bea6f3e46cba1ffbe5adcc.zip |
test: Use SEVERITY_MASK_IDX() to find the LOG_* mask indexes
In the unit tests and fuzzers.
Fixes bug 31334; bugfix on 0.2.5.2-alpha.
Diffstat (limited to 'src/test/testing_common.c')
-rw-r--r-- | src/test/testing_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/testing_common.c b/src/test/testing_common.c index ad22898ce5..9e7d83dcdc 100644 --- a/src/test/testing_common.c +++ b/src/test/testing_common.c @@ -295,7 +295,7 @@ main(int c, const char **v) memset(&s, 0, sizeof(s)); set_log_severity_config(loglevel, LOG_ERR, &s); /* ALWAYS log bug warnings. */ - s.masks[LOG_WARN-LOG_ERR] |= LD_BUG; + s.masks[SEVERITY_MASK_IDX(LOG_WARN)] |= LD_BUG; add_stream_log(&s, "", fileno(stdout)); } { @@ -303,7 +303,7 @@ main(int c, const char **v) log_severity_list_t s; memset(&s, 0, sizeof(s)); set_log_severity_config(LOG_ERR, LOG_ERR, &s); - s.masks[LOG_WARN-LOG_ERR] |= LD_BUG; + s.masks[SEVERITY_MASK_IDX(LOG_WARN)] |= LD_BUG; add_callback_log(&s, log_callback_failure); } flush_log_messages_from_startup(); |