MCPcopy Create free account
hub / github.com/apache/httpd / iq_bubble_up

Function iq_bubble_up

modules/http2/h2_util.c:487–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485}
486
487static int iq_bubble_up(h2_iqueue *q, int i, int top,
488 h2_iq_cmp *cmp, void *ctx)
489{
490 int prev;
491 while (((prev = (q->nalloc + i - 1) % q->nalloc), i != top)
492 && (*cmp)(q->elts[i], q->elts[prev], ctx) < 0) {
493 iq_swap(q, prev, i);
494 i = prev;
495 }
496 return i;
497}
498
499static int iq_bubble_down(h2_iqueue *q, int i, int bottom,
500 h2_iq_cmp *cmp, void *ctx)

Callers 2

h2_iq_addFunction · 0.70
h2_iq_sortFunction · 0.70

Calls 1

iq_swapFunction · 0.70

Tested by

no test coverage detected