ref: 6ffd7e7a7d3581d6d101a17767fcaf20a797a041
parent: 0835c92d23bdea6e2a99c816617ecb02733b8414
author: Ori Bernstein <[email protected]>
date: Fri Jan 18 19:47:59 EST 2013
Use mmap everywhere.
--- a/parse/util.c
+++ b/parse/util.c
@@ -143,13 +143,11 @@
void ldel(void *l, size_t *len, size_t idx)
{
void ***pl;
- size_t i;
assert(l != NULL);
assert(idx < *len);
pl = l;
- for (i = idx; i < *len - 1; i++)
- pl[0][i] = pl[0][i + 1];
+ memmove(&pl[idx - 1], &pl[idx], (*len - idx)*sizeof(void*));
(*len)--;
*pl = xrealloc(*pl, *len * sizeof(void*));
}