| 1354 | } |
| 1355 | |
| 1356 | void *acl_slice_pool_realloc(const char *filename, int line, |
| 1357 | ACL_SLICE_POOL *asp, void *ptr, size_t size) |
| 1358 | { |
| 1359 | void *buf; |
| 1360 | |
| 1361 | buf = acl_slice_pool_alloc(filename, line, asp, size); |
| 1362 | if (ptr != NULL) { |
| 1363 | size_t old_size = *(((size_t*) ptr) - 1); |
| 1364 | if (old_size == 0) { |
| 1365 | old_size = *(((size_t*) ptr) - 2); |
| 1366 | if (old_size == 0) { |
| 1367 | abort(); |
| 1368 | } |
| 1369 | } |
| 1370 | memcpy(buf, ptr, old_size); |
| 1371 | } |
| 1372 | acl_slice_pool_free(filename, line, ptr); |
| 1373 | return buf; |
| 1374 | } |
| 1375 | |
| 1376 | void *acl_slice_pool_memdup(const char *filename, int line, |
| 1377 | ACL_SLICE_POOL *asp, const void *ptr, size_t len) |
no test coverage detected
searching dependent graphs…