From: Michael Tremer Date: Wed, 8 Oct 2025 15:49:02 +0000 (+0000) Subject: sources: unbound: Cleanup some code X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc13effd6570a169b0f5acef2762683ecd0aa180;p=telemetry.git sources: unbound: Cleanup some code Signed-off-by: Michael Tremer --- diff --git a/src/daemon/sources/unbound.c b/src/daemon/sources/unbound.c index ae2ef21..21c7cc2 100644 --- a/src/daemon/sources/unbound.c +++ b/src/daemon/sources/unbound.c @@ -23,22 +23,19 @@ #include "../command.h" #include "../ctx.h" #include "../source.h" -#include "../util.h" #include "unbound.h" static int unbound_on_success(collecty_ctx* ctx, int rc, collecty_file* stdout, void* data) { collecty_source* source = data; - int r; - - // Collect stats - unsigned long queries = 0; + unsigned long rec_time_median = 0; + unsigned long rec_replies = 0; unsigned long cachehits = 0; unsigned long cachemiss = 0; unsigned long prefetch = 0; - unsigned long rec_replies = 0; + unsigned long queries = 0; double rec_time_avg = 0; - unsigned long rec_time_median = 0; + int r; collecty_file_parser parser[] = { { "total.num.queries=%lu", &queries },