diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-09-08 15:01:32 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-09-08 15:03:11 -0400 |
commit | deb294ff532d074a7d4094518c296fe69f819874 (patch) | |
tree | 3a49b6c30ab041807a025fa463ff57ca328165db /src/test/test_util_process.c | |
parent | b0a9e54705d16d08ae7aff272492832dbb35646d (diff) | |
download | tor-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_util_process.c')
-rw-r--r-- | src/test/test_util_process.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/test_util_process.c b/src/test/test_util_process.c index 6add374c33..4e75b97f3d 100644 --- a/src/test/test_util_process.c +++ b/src/test/test_util_process.c @@ -26,7 +26,7 @@ test_util_process_set_waitpid_callback(void *ignored) { (void)ignored; waitpid_callback_t *res1 = NULL, *res2 = NULL; - int previous_log = setup_full_capture_of_logs(LOG_WARN); + setup_full_capture_of_logs(LOG_WARN); pid_t pid = (pid_t)42; res1 = set_waitpid_callback(pid, temp_callback, NULL); @@ -39,7 +39,7 @@ test_util_process_set_waitpid_callback(void *ignored) "impossible.\n"); done: - teardown_capture_of_logs(previous_log); + teardown_capture_of_logs(); clear_waitpid_callback(res1); clear_waitpid_callback(res2); } @@ -49,7 +49,7 @@ test_util_process_clear_waitpid_callback(void *ignored) { (void)ignored; waitpid_callback_t *res; - int previous_log = setup_capture_of_logs(LOG_WARN); + setup_capture_of_logs(LOG_WARN); pid_t pid = (pid_t)43; clear_waitpid_callback(NULL); @@ -65,7 +65,7 @@ test_util_process_clear_waitpid_callback(void *ignored) #endif done: - teardown_capture_of_logs(previous_log); + teardown_capture_of_logs(); } #endif /* _WIN32 */ |