From c8d547f07b97ba82c3a8275af6fbbe248b061855 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 23 May 2011 16:07:18 -0400 Subject: [PATCH] prio heap default alloc min value fix Signed-off-by: Mathieu Desnoyers --- lib/prio_heap/prio_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/prio_heap/prio_heap.c b/lib/prio_heap/prio_heap.c index d4fadda3..58d5d6ae 100644 --- a/lib/prio_heap/prio_heap.c +++ b/lib/prio_heap/prio_heap.c @@ -79,7 +79,7 @@ int heap_init(struct ptr_heap *heap, size_t alloc_len, * Minimum size allocated is 1 entry to ensure memory allocation * never fails within heap_replace_max. */ - return heap_grow(heap, min_t(size_t, 1, alloc_len)); + return heap_grow(heap, max_t(size_t, 1, alloc_len)); } void heap_free(struct ptr_heap *heap) -- 2.34.1