diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-07-06 12:59:43 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-07-06 12:59:43 -0400 |
commit | 96d32f02f2f9d37454665325237cdc2adf7ee2d8 (patch) | |
tree | c5bfd8dacd34c157f8633bf42091bd9bae162969 /src/test/log_test_helpers.c | |
parent | ae22c249c3423acfb7938a36c2c8c5b2cac7fb29 (diff) | |
download | tor-96d32f02f2f9d37454665325237cdc2adf7ee2d8.tar.gz tor-96d32f02f2f9d37454665325237cdc2adf7ee2d8.zip |
When saving mocked log messages, always create the list.
Otherwise, our code needs to check "list && smarlist_len(list)..."
Diffstat (limited to 'src/test/log_test_helpers.c')
-rw-r--r-- | src/test/log_test_helpers.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/log_test_helpers.c b/src/test/log_test_helpers.c index 3bb36ac36c..166a777747 100644 --- a/src/test/log_test_helpers.c +++ b/src/test/log_test_helpers.c @@ -12,6 +12,7 @@ setup_capture_of_logs(int new_level) int previous_log = log_global_min_severity_; log_global_min_severity_ = new_level; mock_clean_saved_logs(); + saved_logs = smartlist_new(); MOCK(logv, mock_saving_logv); return previous_log; } |