From 94a7d04ee6e0d9464422e3d680860d8a2464e6c1 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 23 May 2011 12:13:26 -0400 Subject: [PATCH] Remove GPL heapify implementation Signed-off-by: Mathieu Desnoyers --- lib/prio_heap/prio_heap.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) 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) -- 2.34.1