]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove dead error code.
authorMark Andrews <marka@isc.org>
Wed, 5 Feb 2020 05:00:50 +0000 (16:00 +1100)
committerMark Andrews <marka@isc.org>
Wed, 5 Feb 2020 07:37:17 +0000 (18:37 +1100)
128        return (ISC_R_SUCCESS);
129

CID 1456146 (#1 of 1): Structurally dead code (UNREACHABLE)
unreachable: This code cannot be reached: {
   if (dst->labels[i] != N....

130        do {

lib/dns/ipkeylist.c

index b088c1f80e76dbcb59c07dd24c4b2ce4700e97c0..9011c018a4a2f1b6473edb2d2eb99b4e80df2f82 100644 (file)
@@ -126,26 +126,6 @@ dns_ipkeylist_copy(isc_mem_t *mctx, const dns_ipkeylist_t *src,
        }
        dst->count = src->count;
        return (ISC_R_SUCCESS);
-
-       do {
-               if (dst->labels[i] != NULL) {
-                       if (dns_name_dynamic(dst->labels[i]))
-                               dns_name_free(dst->labels[i], mctx);
-                       isc_mem_put(mctx, dst->labels[i], sizeof(dns_name_t));
-                       dst->labels[i] = NULL;
-               }
-       } while (i-- > 0);
-
-       do {
-               if (dst->keys[i] != NULL) {
-                       if (dns_name_dynamic(dst->keys[i]))
-                               dns_name_free(dst->keys[i], mctx);
-                       isc_mem_put(mctx, dst->keys[i], sizeof(dns_name_t));
-                       dst->keys[i] = NULL;
-               }
-       } while (i-- > 0);
-
-       return (result);
 }
 
 isc_result_t