diff options
author | Alex Wang <alexw@nicira.com> | 2013-10-16 03:32:31 +0000 |
---|---|---|
committer | Ethan Jackson <ethan@nicira.com> | 2013-10-16 18:08:05 -0700 |
commit | 1a29a798ac5f8b903b8cb552038f31288020b0c1 (patch) | |
tree | 5618eb1c29901203764761d6024205a3d567fbf4 /lib/heap.c | |
parent | e441a806a0387487080ca16176ffdee7a75b3d1e (diff) | |
download | openvswitch-1a29a798ac5f8b903b8cb552038f31288020b0c1.tar.gz |
heap: Change type of "priority" in "struct heap".
This commit changes the variable type of priority in "struct heap"
from uint32_t to uint64_t.
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
Diffstat (limited to 'lib/heap.c')
-rw-r--r-- | lib/heap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/heap.c b/lib/heap.c index b2d547a5e..682915ac3 100644 --- a/lib/heap.c +++ b/lib/heap.c @@ -65,7 +65,7 @@ heap_swap(struct heap *a, struct heap *b) * * This takes time O(lg n). */ void -heap_insert(struct heap *heap, struct heap_node *node, uint32_t priority) +heap_insert(struct heap *heap, struct heap_node *node, uint64_t priority) { heap_raw_insert(heap, node, priority); float_up(heap, node->idx); @@ -89,7 +89,7 @@ heap_remove(struct heap *heap, struct heap_node *node) * * This takes time O(lg n). */ void -heap_change(struct heap *heap, struct heap_node *node, uint32_t priority) +heap_change(struct heap *heap, struct heap_node *node, uint64_t priority) { heap_raw_change(node, priority); float_up_or_down(heap, node->idx); @@ -104,7 +104,7 @@ heap_change(struct heap *heap, struct heap_node *node, uint32_t priority) * * This takes time O(1). */ void -heap_raw_insert(struct heap *heap, struct heap_node *node, uint32_t priority) +heap_raw_insert(struct heap *heap, struct heap_node *node, uint64_t priority) { if (heap->n >= heap->allocated) { heap->allocated = heap->n == 0 ? 1 : 2 * heap->n; |