From 624a7d8b41160cd924a8230f6ebddb2c89f45c76 Mon Sep 17 00:00:00 2001 From: kachelto100370 Date: Fri, 5 Dec 2025 10:41:08 +0100 Subject: [PATCH] slight changes to stackNode struct, void func, etc --- bintree.c | 2 +- stack.c | 2 +- stack.h | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bintree.c b/bintree.c index 5cf82a9..0c5b453 100644 --- a/bintree.c +++ b/bintree.c @@ -1,4 +1,4 @@ -#include +t #include #include "stack.h" #include "bintree.h" diff --git a/stack.c b/stack.c index 35e7708..dbda947 100644 --- a/stack.c +++ b/stack.c @@ -69,7 +69,7 @@ StackNode *pop(StackNode *stack) { void *top(StackNode *stack) { return stack != NULL ? stack->data : NULL; } // Clears stack and releases all memory. -StackNode *clearStack(StackNode *stack) { +void *clearStack(StackNode *stack) { while (stack != NULL) { diff --git a/stack.h b/stack.h index f90d217..fb1cd04 100644 --- a/stack.h +++ b/stack.h @@ -13,7 +13,8 @@ typedef struct StackNode { void *data; struct StackNode *next; - + struct StackNode *prev; + } StackNode; StackNode *createNode(void *data);