[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] When saving mocked log messages, always create the list.



commit 96d32f02f2f9d37454665325237cdc2adf7ee2d8
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Wed Jul 6 12:59:43 2016 -0400

    When saving mocked log messages, always create the list.
    
    Otherwise, our code needs to check "list && smarlist_len(list)..."
---
 src/test/log_test_helpers.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/test/log_test_helpers.c b/src/test/log_test_helpers.c
index 3bb36ac..166a777 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;
 }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits