From: Michael Tremer Date: Sun, 26 Oct 2025 17:55:52 +0000 (+0000) Subject: sources: iptables: Initialize r X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ee3094a21b91dc542b53353bc78ff95324e073e;p=telemetry.git sources: iptables: Initialize r Signed-off-by: Michael Tremer --- diff --git a/src/daemon/sources/iptables.c b/src/daemon/sources/iptables.c index c7e4fec..8c90df3 100644 --- a/src/daemon/sources/iptables.c +++ b/src/daemon/sources/iptables.c @@ -114,7 +114,7 @@ static int iptables_iterate_matches(td_ctx* ctx, td_source* source, const struct xt_comment_info* comment = NULL; const struct xt_entry_match* match = NULL; iptables_comment* c = NULL; - int r; + int r = 0; // Start with the first match and determine the end const unsigned char* p = rule->elems; @@ -173,7 +173,7 @@ static int iptables_iterate_table(td_ctx* ctx, td_source* source, const char* ta iptables_comment** comments, unsigned int* num_comments) { iptc_handle_t* handle = NULL; const char* chain = NULL; - int r; + int r = 0; // Create a new handle handle = iptc_init(table);