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

Function move_to_last

modules/http2/h2_push.c:607–624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605}
606
607static 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
626static void remove_first(h2_push_diary *diary)
627{

Callers 1

h2_push_diary_updateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected