From d9d29ab80ddc33e864bf9caf36db524bbd3a0d25 Mon Sep 17 00:00:00 2001 From: Kirill Petrashin Date: Sun, 3 May 2026 21:00:44 +0300 Subject: Fix return type for ps_push() --- stack.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'stack.c') 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) { -- cgit v1.2.3