isc_event_allocate() cannot fail, remove the fail handling blocks

isc_event_allocate() calls isc_mem_get() to allocate the event structure.  As
isc_mem_get() cannot fail softly (e.g. it never returns NULL), the
isc_event_allocate() cannot return NULL, hence we remove the (ret == NULL)
handling blocks using the semantic patch from the previous commit.
This commit is contained in:
Ondřej Surý
2019-08-29 10:29:53 +02:00
parent 2d12def6ee
commit 50e109d659
21 changed files with 15 additions and 196 deletions

View File

@@ -213,10 +213,6 @@ syncptr(sample_instance_t *inst, dns_name_t *name,
SYNCPTR_WRITE_EVENT,
syncptr_write, NULL,
sizeof(syncptrevent_t));
if (pevent == NULL) {
result = ISC_R_NOMEMORY;
goto cleanup;
}
isc_buffer_init(&pevent->b, pevent->buf, sizeof(pevent->buf));
dns_fixedname_init(&pevent->ptr_target_name);