From b6e8549f2486eaa95958083d5859fbfe91142bca Mon Sep 17 00:00:00 2001 From: dobiadi Date: Fri, 13 Dec 2024 16:04:05 +0100 Subject: [PATCH] Less --- day11/c/day11.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/day11/c/day11.c b/day11/c/day11.c index 9026f59..ba8faad 100644 --- a/day11/c/day11.c +++ b/day11/c/day11.c @@ -70,16 +70,12 @@ void add_leaf(stone_t* root, stone_t* leaf) { } uint64_t call_on_leaf(stone_t *leaf, void (*cb)(stone_t*, void*), void* ctx) { - //printf("%lu\n", leaf->value); - cb(leaf, ctx); - if (*(int*)ctx == 0) { - for (int i = 0; i < leaf->leaf_count; i++) { - free(leaf->leafs[i]); - } free(leaf); return 1; } + cb(leaf, ctx); + uint64_t sum = 0;