diff options
Diffstat (limited to 'stack.c')
| -rw-r--r-- | stack.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -15,7 +15,7 @@ PositionStack ps_new(void) { int 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) return -1; + 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; |
