]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
'indentctx' is always defined. Just use it.
authorMark Andrews <marka@isc.org>
Wed, 5 Feb 2020 04:55:08 +0000 (15:55 +1100)
committerMark Andrews <marka@isc.org>
Wed, 5 Feb 2020 07:37:17 +0000 (18:37 +1100)
402        ctx->serve_stale_ttl = 0;

notnull: At condition indentctx, the value of indentctx
cannot be NULL.  dead_error_condition: The condition indentctx
must be true.

CID 1456147 (#1 of 1): Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach the expression
default_indent inside this statement: ctx->indent = (indentctx
? ....

403        ctx->indent = indentctx ? *indentctx : default_indent;

lib/dns/masterdump.c

index 662652bf8a672a99a08de4fb6f2462f26eab6505..f3f02d049b0d6507844ae19cac848d8e825244b4 100644 (file)
@@ -400,7 +400,7 @@ totext_ctx_init(const dns_master_style_t *style, const dns_indent_t *indentctx,
        ctx->current_ttl = 0;
        ctx->current_ttl_valid = false;
        ctx->serve_stale_ttl = 0;
-       ctx->indent = indentctx ? *indentctx : default_indent;
+       ctx->indent = *indentctx;
 
        return (ISC_R_SUCCESS);
 }