File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ static void acmp_build_binary_tree(ACMP *parser, acmp_node_t *node) {
226
226
227
227
/* We have array with all children of the node and number of those children
228
228
*/
229
- for (i = 0 ; i < count - 1 ; i++)
229
+ for (i = 0 ; i < count - 1 ; i++) {
230
230
for (j = i + 1 ; j < count; j++) {
231
231
acmp_node_t *tmp;
232
232
@@ -236,10 +236,11 @@ static void acmp_build_binary_tree(ACMP *parser, acmp_node_t *node) {
236
236
nodes[i] = nodes[j];
237
237
nodes[j] = tmp;
238
238
}
239
- if (node->btree != NULL ) {
240
- free (node->btree );
241
- node->btree = NULL ;
242
- }
239
+ }
240
+ if (node->btree != NULL ) {
241
+ free (node->btree );
242
+ node->btree = NULL ;
243
+ }
243
244
node->btree = reinterpret_cast <acmp_btree_node_t *>(calloc (1 , sizeof (acmp_btree_node_t )));
244
245
245
246
/* ENH: Check alloc succeded */
You can’t perform that action at this time.
0 commit comments