diff --git a/stack.c b/stack.c index a483a6e860208330d5085acee160ab437bebab87..0555575e7f5742c12a0d42ed1a4971e35d8ba9db 100644 --- a/stack.c +++ b/stack.c @@ -18,11 +18,6 @@ void stack_destroy(stack *s) { void stack_push(stack *s, int value) { - if (s->top == s->capacity-1) - { - assert(s->data = realloc(s->capacity * 2 * sizeof(int)) && "Error : realloc failed"); - } - s->top++; s->data[s->top] = value; }