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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user