From: Mathieu Desnoyers Date: Mon, 23 May 2011 20:07:18 +0000 (-0400) Subject: prio heap default alloc min value fix X-Git-Tag: v2.0-pre1~112 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=c8d547f07b97ba82c3a8275af6fbbe248b061855;p=lttng-modules.git prio heap default alloc min value fix Signed-off-by: Mathieu Desnoyers --- 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)