| 588 | } |
| 589 | |
| 590 | static int h2_push_diary_find(h2_push_diary *diary, apr_uint64_t hash) |
| 591 | { |
| 592 | if (diary) { |
| 593 | h2_push_diary_entry *e; |
| 594 | int i; |
| 595 | |
| 596 | /* search from the end, where the last accessed digests are */ |
| 597 | for (i = diary->entries->nelts-1; i >= 0; --i) { |
| 598 | e = &APR_ARRAY_IDX(diary->entries, i, h2_push_diary_entry); |
| 599 | if (e->hash == hash) { |
| 600 | return i; |
| 601 | } |
| 602 | } |
| 603 | } |
| 604 | return -1; |
| 605 | } |
| 606 | |
| 607 | static void move_to_last(h2_push_diary *diary, apr_size_t idx) |
| 608 | { |
no outgoing calls
no test coverage detected