From: Colin Vidal Date: Tue, 14 Oct 2025 11:31:44 +0000 (+0200) Subject: mdig: fix implicit bool to int cast X-Git-Tag: v9.21.16~54^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25f303f0466ffc821b87ca9aced5935dcaa0be21;p=thirdparty%2Fbind9.git mdig: fix implicit bool to int cast The `display_rrcomments` is a tri-state (-1, 0, 1) which is (in some cases) initialized with `state`, a boolean, through an implicit cast. This was spot by Coccinelle. Remove the implcit cast by explicitly assigning 0 or 1 to `display_rrcomments` based on `state` value. --- diff --git a/bin/tools/mdig.c b/bin/tools/mdig.c index 339b75644a2..ddfddee46de 100644 --- a/bin/tools/mdig.c +++ b/bin/tools/mdig.c @@ -1594,7 +1594,7 @@ plus_option(char *option, struct query *query, bool global) { FULLCHECK("yaml"); yaml = state; if (state) { - display_rrcomments = state; + display_rrcomments = 1; } break; case 'z': /* zflag */