From c8e292bd0a0f1da7d3b62d8c8b5adb73517970f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind?= Date: Sun, 13 Feb 2022 18:37:47 +0100 Subject: [PATCH] Move comments --- exercises/02/vslc/src/tree.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/02/vslc/src/tree.c b/exercises/02/vslc/src/tree.c index 108c644..678888f 100644 --- a/exercises/02/vslc/src/tree.c +++ b/exercises/02/vslc/src/tree.c @@ -68,11 +68,11 @@ node_print ( node_t *root, int nesting ) printf ( "%*c%p\n", nesting, ' ', root ); } -// The discard should have zero children here. If not -> MEMORY LEAK + static void node_finalize ( node_t *discard ) -{ - // Free the data and the children lists. +{ // The discard should have zero children here. If not -> MEMORY LEAK + // Free the data and the children list. free(discard->data); free(discard->children); free(discard); @@ -87,7 +87,7 @@ destroy_subtree ( node_t *discard ) return; // This will not run if n_children is zero - // If non-zero, destroy all child recursivly + // If non-zero, destroy all children recursivly while (discard->n_children--) destroy_subtree(discard->children[discard->n_children]);