aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_compat_libevent.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-09-08 15:01:32 -0400
committerNick Mathewson <nickm@torproject.org>2016-09-08 15:03:11 -0400
commitdeb294ff532d074a7d4094518c296fe69f819874 (patch)
tree3a49b6c30ab041807a025fa463ff57ca328165db /src/test/test_compat_libevent.c
parentb0a9e54705d16d08ae7aff272492832dbb35646d (diff)
downloadtor-deb294ff532d074a7d4094518c296fe69f819874.tar.gz
tor-deb294ff532d074a7d4094518c296fe69f819874.zip
Simplify log_test_helpers interface
Previously, you needed to store the previous log severity in a local variable, and it wasn't clear if you were allowed to call these functions more than once.
Diffstat (limited to 'src/test/test_compat_libevent.c')
-rw-r--r--src/test/test_compat_libevent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test_compat_libevent.c b/src/test/test_compat_libevent.c
index 5e14be5b33..0443cc0b1c 100644
--- a/src/test/test_compat_libevent.c
+++ b/src/test/test_compat_libevent.c
@@ -20,7 +20,7 @@ static void
test_compat_libevent_logging_callback(void *ignored)
{
(void)ignored;
- int previous_log = setup_full_capture_of_logs(LOG_DEBUG);
+ setup_full_capture_of_logs(LOG_DEBUG);
libevent_logging_callback(_EVENT_LOG_DEBUG, "hello world");
expect_log_msg("Message from libevent: hello world\n");
@@ -106,7 +106,7 @@ test_compat_libevent_logging_callback(void *ignored)
done:
suppress_libevent_log_msg(NULL);
- teardown_capture_of_logs(previous_log);
+ teardown_capture_of_logs();
}
static void