Merge pull request #3424 from wooffie/patch-1

fix: confusing indentation at acmp.cc
This commit is contained in:
Ervin Hegedus 2025-07-28 19:07:27 +03:00 committed by GitHub
commit 690355b297
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -226,7 +226,7 @@ static void acmp_build_binary_tree(ACMP *parser, acmp_node_t *node) {
/* We have array with all children of the node and number of those children /* We have array with all children of the node and number of those children
*/ */
for (i = 0; i < count - 1; i++) for (i = 0; i < count - 1; i++) {
for (j = i + 1; j < count; j++) { for (j = i + 1; j < count; j++) {
acmp_node_t *tmp; acmp_node_t *tmp;
@ -236,10 +236,11 @@ static void acmp_build_binary_tree(ACMP *parser, acmp_node_t *node) {
nodes[i] = nodes[j]; nodes[i] = nodes[j];
nodes[j] = tmp; nodes[j] = tmp;
} }
if (node->btree != NULL) { }
free(node->btree); if (node->btree != NULL) {
node->btree = NULL; free(node->btree);
} node->btree = NULL;
}
node->btree = reinterpret_cast<acmp_btree_node_t *>(calloc(1, sizeof(acmp_btree_node_t))); node->btree = reinterpret_cast<acmp_btree_node_t *>(calloc(1, sizeof(acmp_btree_node_t)));
/* ENH: Check alloc succeded */ /* ENH: Check alloc succeded */