diff --git a/src/mystack.c b/src/mystack.c index 3cafe5b..5233cf2 100644 --- a/src/mystack.c +++ b/src/mystack.c @@ -2,13 +2,16 @@ #include #include + +#define EMPTY_STACK -1 + /* * instantiates a new stack and returns a pointer to it. * must be free'ed using stack_delete(...) */ MyStack* stack_create(){ MyStack* stack = (MyStack*)malloc(sizeof(MyStack)); - stack->top = -1; + stack->top = EMPTY_STACK; return stack; }