diff options
Diffstat (limited to 'auto_tests/helpers.h')
-rw-r--r-- | auto_tests/helpers.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/auto_tests/helpers.h b/auto_tests/helpers.h index 373b4a37..7b6146a4 100644 --- a/auto_tests/helpers.h +++ b/auto_tests/helpers.h | |||
@@ -3,6 +3,8 @@ | |||
3 | 3 | ||
4 | #include "../toxcore/tox.h" | 4 | #include "../toxcore/tox.h" |
5 | 5 | ||
6 | #include "../toxcore/ccompat.h" | ||
7 | |||
6 | #include <assert.h> | 8 | #include <assert.h> |
7 | #include <stdio.h> | 9 | #include <stdio.h> |
8 | #include <string.h> | 10 | #include <string.h> |
@@ -67,17 +69,17 @@ Tox *tox_new_log(struct Tox_Options *options, TOX_ERR_NEW *err, void *log_user_d | |||
67 | { | 69 | { |
68 | struct Tox_Options *log_options = options; | 70 | struct Tox_Options *log_options = options; |
69 | 71 | ||
70 | if (log_options == NULL) { | 72 | if (log_options == nullptr) { |
71 | log_options = tox_options_new(NULL); | 73 | log_options = tox_options_new(nullptr); |
72 | } | 74 | } |
73 | 75 | ||
74 | assert(log_options != NULL); | 76 | assert(log_options != nullptr); |
75 | 77 | ||
76 | tox_options_set_log_callback(log_options, &print_debug_log); | 78 | tox_options_set_log_callback(log_options, &print_debug_log); |
77 | tox_options_set_log_user_data(log_options, log_user_data); | 79 | tox_options_set_log_user_data(log_options, log_user_data); |
78 | Tox *tox = tox_new(log_options, err); | 80 | Tox *tox = tox_new(log_options, err); |
79 | 81 | ||
80 | if (options == NULL) { | 82 | if (options == nullptr) { |
81 | tox_options_free(log_options); | 83 | tox_options_free(log_options); |
82 | } | 84 | } |
83 | 85 | ||