summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorCliff Woolley <jwoolley@apache.org>2002-08-14 01:49:26 +0200
committerCliff Woolley <jwoolley@apache.org>2002-08-14 01:49:26 +0200
commit1b5b841aad122cd2f6b62ac62207380dc9e69599 (patch)
tree63bb1eeecadb8bdb1f720ce57e2d43f2b6eb402b /modules
parentadd some debugging code -- verifies that the heap property is satisfied (diff)
downloadapache2-1b5b841aad122cd2f6b62ac62207380dc9e69599.tar.xz
apache2-1b5b841aad122cd2f6b62ac62207380dc9e69599.zip
this is a maxheap. this function is therefore named backwards. :)
no functional change. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96368 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules')
-rw-r--r--modules/experimental/cache_pqueue.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/experimental/cache_pqueue.c b/modules/experimental/cache_pqueue.c
index 610f426c86..02dcec5bde 100644
--- a/modules/experimental/cache_pqueue.c
+++ b/modules/experimental/cache_pqueue.c
@@ -143,7 +143,7 @@ static void cache_pq_bubble_up(cache_pqueue_t *q, apr_ssize_t i)
q->set(moving_node, i);
}
-static apr_ssize_t minchild(cache_pqueue_t *q, apr_ssize_t i)
+static apr_ssize_t maxchild(cache_pqueue_t *q, apr_ssize_t i)
{
apr_ssize_t child_node = left(i);
@@ -165,7 +165,7 @@ static void cache_pq_percolate_down(cache_pqueue_t *q, apr_ssize_t i)
void *moving_node = q->d[i];
long moving_pri = q->pri(moving_node);
- while ((child_node = minchild(q, i)) &&
+ while ((child_node = maxchild(q, i)) &&
(moving_pri < q->pri(q->d[child_node])))
{
q->d[i] = q->d[child_node];
@@ -300,13 +300,13 @@ void cache_pq_dump(cache_pqueue_t *q,
{
int i;
- fprintf(stdout,"posn\tleft\tright\tparent\tminchild\t...\n");
+ fprintf(stdout,"posn\tleft\tright\tparent\tmaxchild\t...\n");
for (i = 1; i < q->size ;i++) {
fprintf(stdout,
"%d\t%d\t%d\t%d\t%" APR_SSIZE_T_FMT "\t",
i,
left(i), right(i), parent(i),
- minchild(q, i));
+ maxchild(q, i));
print(out, q->d[i]);
}
}