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

Function md_array_remove

modules/md/md_util.c:211–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211int md_array_remove(struct apr_array_header_t *a, void *elem)
212{
213 int i, n, m;
214 void **pe;
215
216 assert(sizeof(void*) == a->elt_size);
217 n = i = 0;
218 while (i < a->nelts) {
219 pe = &APR_ARRAY_IDX(a, i, void*);
220 if (*pe == elem) {
221 m = a->nelts - (i+1);
222 if (m > 0) memmove(pe, pe+1, (unsigned)m*sizeof(void*));
223 a->nelts--;
224 n++;
225 continue;
226 }
227 ++i;
228 }
229 return n;
230}
231
232/**************************************************************************************************/
233/* string related */

Callers 2

md_curl_multi_performFunction · 0.85
md_reg_sync_startFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected