Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-21fa
project01
Commits
82fad9d3
Commit
82fad9d3
authored
3 years ago
by
An N Tran
Browse files
Options
Download
Email Patches
Plain Diff
Fix errors
parent
940b4961
master
No related merge requests found
Pipeline
#53048
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
heap.c
+2
-2
heap.c
with
2 additions
and
2 deletions
+2
-2
heap.c
View file @
82fad9d3
...
...
@@ -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
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help