prio heap default alloc min value fix
[lttng-modules.git] / 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.0232 seconds and 4 git commands to generate.