| 485 | } |
| 486 | |
| 487 | static 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 | |
| 499 | static int iq_bubble_down(h2_iqueue *q, int i, int bottom, |
| 500 | h2_iq_cmp *cmp, void *ctx) |
no test coverage detected