Commit 82fad9d3 authored by An N Tran's avatar An N Tran :speech_balloon:
Browse files

Fix errors

parent 940b4961
Pipeline #53048 failed with stage
Showing with 2 additions and 2 deletions
+2 -2
......@@ -4,7 +4,7 @@
typedef struct heap {
/** Generic array of pointers. */
void **ptr;
int32_t **ptr;
/** How many pointers there are currently in the array. */
int32_t count;
} heap_t;
......@@ -12,7 +12,7 @@ typedef struct heap {
heap_t *heap_init() {
// The heap array is initially allocated to hold zero elements.
heap_t *heap = malloc(sizeof(heap_t));
heap->ptr = malloc(0);
heap->ptr = NULL;
heap->count = 0;
return heap;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment