]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
dns/lookup.c: Return void when ISC_R_SUCCESS is only returned value
authorOndřej Surý <ondrej@sury.org>
Wed, 6 Oct 2021 10:46:45 +0000 (12:46 +0200)
committerOndřej Surý <ondrej@sury.org>
Wed, 13 Oct 2021 03:47:48 +0000 (05:47 +0200)
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

index b72bbf7758af17e4cd15e4a79d691b95eac5c2cd..bdd26d505a38fc86edfb7a5b7a4e6a6aa17ba281 100644 (file)
@@ -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;
                        }