Skip to content

Commit

Permalink
Fix wrong sizeof argument (SIZEOF_MISMATCH) (#3861)
Browse files Browse the repository at this point in the history
  • Loading branch information
huanghantao authored Nov 20, 2020
1 parent d6476dc commit a190737
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/heap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,16 @@ void Heap::percolate_down(uint32_t i) {
}

HeapNode *Heap::push(uint64_t priority, void *data) {
void *tmp;
HeapNode **tmp;
uint32_t i;
uint32_t newsize;

if (num >= size) {
newsize = size * 2;
if (!(tmp = sw_realloc(nodes, sizeof(void *) * newsize))) {
if (!(tmp = (HeapNode **) sw_realloc(nodes, sizeof(HeapNode *) * newsize))) {
return nullptr;
}
nodes = (HeapNode **) tmp;
nodes = tmp;
size = newsize;
}

Expand Down

0 comments on commit a190737

Please sign in to comment.