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

Function md_array_remove_at

modules/md/md_util.c:194–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192/* generic arrays */
193
194int md_array_remove_at(struct apr_array_header_t *a, int idx)
195{
196 char *ps, *pe;
197
198 if (idx < 0 || idx >= a->nelts) return 0;
199 if (idx+1 == a->nelts) {
200 --a->nelts;
201 }
202 else {
203 ps = (a->elts + (idx * a->elt_size));
204 pe = ps + a->elt_size;
205 memmove(ps, pe, (size_t)((a->nelts - (idx+1)) * a->elt_size));
206 --a->nelts;
207 }
208 return 1;
209}
210
211int md_array_remove(struct apr_array_header_t *a, void *elem)
212{

Callers 1

md_reg_sync_startFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected