From: Mathieu Desnoyers Date: Mon, 23 May 2011 16:13:26 +0000 (-0400) Subject: Remove GPL heapify implementation X-Git-Tag: v2.0-pre1~114 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=94a7d04ee6e0d9464422e3d680860d8a2464e6c1;p=lttng-modules.git Remove GPL heapify implementation Signed-off-by: Mathieu Desnoyers --- diff --git a/lib/prio_heap/prio_heap.c b/lib/prio_heap/prio_heap.c index 0c9bb607..ae47ebb8 100644 --- a/lib/prio_heap/prio_heap.c +++ b/lib/prio_heap/prio_heap.c @@ -40,24 +40,7 @@ void heap_free(struct ptr_heap *heap) static void heapify(struct ptr_heap *heap, int pos) { - void **ptrs = heap->ptrs; - void *p = ptrs[pos]; - - while (1) { - int left = 2 * pos + 1; - int right = 2 * pos + 2; - int largest = pos; - if (left < heap->size && heap->gt(ptrs[left], p)) - largest = left; - if (right < heap->size && heap->gt(ptrs[right], ptrs[largest])) - largest = right; - if (largest == pos) - break; - /* Push p down the heap one level and bump one up */ - ptrs[pos] = ptrs[largest]; - ptrs[largest] = p; - pos = largest; - } + /* TODO */ } void *heap_replace_max(struct ptr_heap *heap, void *p)