From d30a042fa8348028e0bea6f3e46cba1ffbe5adcc Mon Sep 17 00:00:00 2001 From: teor Date: Wed, 25 Sep 2019 16:35:02 +1000 Subject: 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. --- src/test/test_options.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/test/test_options.c') diff --git a/src/test/test_options.c b/src/test/test_options.c index 0747a2e062..b3654ede7d 100644 --- a/src/test/test_options.c +++ b/src/test/test_options.c @@ -54,9 +54,9 @@ setup_log_callback(void) { log_severity_list_t lst; memset(&lst, 0, sizeof(lst)); - lst.masks[LOG_ERR - LOG_ERR] = ~0; - lst.masks[LOG_WARN - LOG_ERR] = ~0; - lst.masks[LOG_NOTICE - LOG_ERR] = ~0; + lst.masks[SEVERITY_MASK_IDX(LOG_ERR)] = ~0; + lst.masks[SEVERITY_MASK_IDX(LOG_WARN)] = ~0; + lst.masks[SEVERITY_MASK_IDX(LOG_NOTICE)] = ~0; add_callback_log(&lst, log_cback); mark_logs_temp(); } -- cgit v1.2.3-54-g00ecf