2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Remove blocks checking whether isc_mem_get() failed using the coccinelle

This commit is contained in:
Ondřej Surý
2019-07-16 15:52:14 +02:00
parent f63e696967
commit ae83801e2b
133 changed files with 151 additions and 1717 deletions

View File

@@ -88,8 +88,6 @@ isc_heap_create(isc_mem_t *mctx, isc_heapcompare_t compare,
REQUIRE(compare != NULL);
heap = isc_mem_get(mctx, sizeof(*heap));
if (heap == NULL)
return (ISC_R_NOMEMORY);
heap->magic = HEAP_MAGIC;
heap->size = 0;
heap->mctx = NULL;
@@ -134,8 +132,6 @@ resize(isc_heap_t *heap) {
new_size = heap->size + heap->size_increment;
new_array = isc_mem_get(heap->mctx, new_size * sizeof(void *));
if (new_array == NULL)
return (false);
if (heap->array != NULL) {
memmove(new_array, heap->array, heap->size * sizeof(void *));
isc_mem_put(heap->mctx, heap->array,