Skip to content
Snippets Groups Projects
Commit 4ad268aa authored by richarda.tyarks's avatar richarda.tyarks
Browse files

remove warning message

parent 5401bb7f
No related branches found
No related tags found
1 merge request!7add function stack_push
...@@ -18,11 +18,6 @@ void stack_destroy(stack *s) { ...@@ -18,11 +18,6 @@ void stack_destroy(stack *s) {
void stack_push(stack *s, int value) 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->top++;
s->data[s->top] = value; s->data[s->top] = value;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment