From ffd09ec5f03a6c238a66f46f12e35b2a7dac7521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Wed, 6 Oct 2021 12:46:45 +0200 Subject: [PATCH] dns/lookup.c: Return void when ISC_R_SUCCESS is only returned value With isc_mem_get() and dns_name_dup() no longer being able to fail, some functions can now only return ISC_R_SUCCESS. Change the return type to void for the following function(s): * build_event() --- lib/dns/lookup.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/dns/lookup.c b/lib/dns/lookup.c index b72bbf7758..bdd26d505a 100644 --- a/lib/dns/lookup.c +++ b/lib/dns/lookup.c @@ -90,7 +90,7 @@ start_fetch(dns_lookup_t *lookup) { return (result); } -static isc_result_t +static void build_event(dns_lookup_t *lookup) { dns_name_t *name = NULL; dns_rdataset_t *rdataset = NULL; @@ -115,8 +115,6 @@ build_event(dns_lookup_t *lookup) { lookup->event->name = name; lookup->event->rdataset = rdataset; lookup->event->sigrdataset = sigrdataset; - - return (ISC_R_SUCCESS); } static isc_result_t @@ -216,7 +214,7 @@ lookup_find(dns_lookup_t *lookup, dns_fetchevent_t *event) { switch (result) { case ISC_R_SUCCESS: - result = build_event(lookup); + build_event(lookup); if (event == NULL) { break; }