prio heap default alloc min value fix
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 23 May 2011 20:07:18 +0000 (16:07 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 23 May 2011 20:07:18 +0000 (16:07 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lib/prio_heap/prio_heap.c

index d4fadda3be8a53229fd5926a96b009a48eb5f1db..58d5d6ae9df05a112026196b252a204cbd432407 100644 (file)
@@ -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)
This page took 0.025929 seconds and 4 git commands to generate.