aboutsummaryrefslogtreecommitdiff
path: root/stack.c
diff options
context:
space:
mode:
Diffstat (limited to 'stack.c')
-rw-r--r--stack.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/stack.c b/stack.c
index d13749e..d1e9b24 100644
--- a/stack.c
+++ b/stack.c
@@ -12,14 +12,13 @@ PositionStack ps_new(void) {
return ps;
}
-int ps_push(PositionStack *ps, Position pos) {
+void ps_push(PositionStack *ps, Position pos) {
if (ps->top >= ps->capacity) {
ps->capacity *= STACK_SIZE_COEFFICIENT;
if ((ps->arr = realloc(ps->arr, sizeof(Position) * ps->capacity)) == NULL) error("Failed to realloc ps->arr\n");
}
ps->arr[ps->top] = pos;
ps->top += 1;
- return 0;
}
Position ps_pop(PositionStack *ps) {