diff options
author | Chris Hall <GMCH@hestia.halldom.com> | 2010-01-20 15:42:07 +0000 |
---|---|---|
committer | Chris Hall <GMCH@hestia.halldom.com> | 2010-01-20 15:42:07 +0000 |
commit | 1ef29647b157db20b054d019981f5113fddeaa91 (patch) | |
tree | 1756d2bab8bb32d4dbe0afa75ef929d36c918b74 /lib/heap.c | |
parent | c9def9a6117b3fa757da059997d2f27d84d85ec8 (diff) | |
download | quagga-1ef29647b157db20b054d019981f5113fddeaa91.tar.bz2 quagga-1ef29647b157db20b054d019981f5113fddeaa91.tar.xz |
Fixing heap_push.
Diffstat (limited to 'lib/heap.c')
-rw-r--r-- | lib/heap.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -433,7 +433,7 @@ heap_bubble_up(heap h, vector_index i, p_vector_item p_v) while (i != 0) { ip = HEAP_UP(i) ; - p_p = &ha[ip] ; /* get parent */ + p_p = ha[ip] ; /* get parent */ if (h->cmp(&p_v, &p_p) >= 0) break ; /* stop when value >= parent */ @@ -470,12 +470,12 @@ heap_bubble_down(heap h, vector_index i, p_vector_item p_v) ic = HEAP_DOWN(i) ; if (ic >= e) break ; /* Quit if run out of heap ! */ - p_c = &ha[ic] ; /* get left hand child */ + p_c = ha[ic] ; /* get left hand child */ is = ic + 1 ; if (is < e) /* is there a right hand child ? */ { - p_s = &ha[is] ; /* get right hand child */ + p_s = ha[is] ; /* get right hand child */ if (h->cmp(&p_s, &p_c) < 0) { ic = is ; /* select smaller sibling */ |