From 25f303f0466ffc821b87ca9aced5935dcaa0be21 Mon Sep 17 00:00:00 2001 From: Colin Vidal Date: Tue, 14 Oct 2025 13:31:44 +0200 Subject: [PATCH] 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. --- bin/tools/mdig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tools/mdig.c b/bin/tools/mdig.c index 339b75644a..ddfddee46d 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 */