| 605 | } |
| 606 | |
| 607 | static void move_to_last(h2_push_diary *diary, apr_size_t idx) |
| 608 | { |
| 609 | h2_push_diary_entry *entries = (h2_push_diary_entry*)diary->entries->elts; |
| 610 | h2_push_diary_entry e; |
| 611 | apr_size_t lastidx; |
| 612 | |
| 613 | /* Move an existing entry to the last place */ |
| 614 | if (diary->entries->nelts <= 0) |
| 615 | return; |
| 616 | |
| 617 | /* move entry[idx] to the end */ |
| 618 | lastidx = diary->entries->nelts - 1; |
| 619 | if (idx < lastidx) { |
| 620 | e = entries[idx]; |
| 621 | memmove(entries+idx, entries+idx+1, sizeof(h2_push_diary_entry) * (lastidx - idx)); |
| 622 | entries[lastidx] = e; |
| 623 | } |
| 624 | } |
| 625 | |
| 626 | static void remove_first(h2_push_diary *diary) |
| 627 | { |
no outgoing calls
no test coverage detected