Skip to content

Commit 485e804

Browse files
committed
lgtm fix
1 parent a52d7c5 commit 485e804

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Src/heap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ HeapAlloc_Gen(Heap *heap)
154154
}
155155

156156
heap->hunks[heap->num_hunks] =
157-
(void *) emalloc(heap->chnk_sze * heap->ch_ratio);
157+
(void *) emalloc((size_t) heap->chnk_sze * (size_t) heap->ch_ratio);
158158

159159
#ifdef DEBUG
160160
printf("2 chunk allocate at %p -- %d * %d bytes\n",
@@ -171,7 +171,7 @@ HeapAlloc_Gen(Heap *heap)
171171
+ (heap->chnk_sze * chnk)));
172172
}
173173
} else
174-
{ heap->hunks[0] = (void *) emalloc(heap->chnk_sze * heap->ch_ratio);
174+
{ heap->hunks[0] = (void *) emalloc((size_t) heap->chnk_sze * (size_t) heap->ch_ratio);
175175
#ifdef DEBUG
176176
printf("1 chunk allocate at %p -- %d * %d bytes\n",
177177
heap->hunks[0], heap->chnk_sze, heap->ch_ratio);

0 commit comments

Comments
 (0)