Skip to content

Commit

Permalink
fix: memset to 0 instead of empty initializing array
Browse files Browse the repository at this point in the history
  • Loading branch information
iWas-Coder committed Jun 15, 2024
1 parent c320259 commit ab7b56b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/carbon_test_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ unsigned char carbon_test_manager_run(void) {
}
size_t passed = 0, failed = 0;
carbon_junit_testsuite junit_testsuite_info = { .tests = test_suite.n };
carbon_junit_testcase junit_testcase_infos[test_suite.n] = {};
carbon_junit_testcase junit_testcase_infos[test_suite.n];
memset(junit_testcase_infos, 0, test_suite.n * sizeof(carbon_junit_testcase));
clock_t total_time_start = clock();
for (size_t i = 0; i < test_suite.n; ++i) {
unsigned char result = test_suite.tests[i].f();
Expand Down

0 comments on commit ab7b56b

Please sign in to comment.