From: Michal Privoznik Date: Thu, 8 Jan 2026 15:57:19 +0000 (+0100) Subject: network: Drop const for forwardIf in pfAddNatFirewallRules() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=adb19c902b9b60f06041b3968eecc19a36ed1759;p=thirdparty%2Flibvirt.git network: Drop const for forwardIf in pfAddNatFirewallRules() The 'forwardIf' variable inside of pfAddNatFirewallRules() is declared as both g_autofree and const. This makes no sense. Since the variable is g_strdup()-ed into right in the declaration, it's not const. Drop that part of variable declaration. Signed-off-by: Michal Privoznik Reviewed-by: Roman Bogorodskiy Reviewed-by: Jiri Denemark --- diff --git a/src/network/network_pf.c b/src/network/network_pf.c index 34e2f60e82..724b82c054 100644 --- a/src/network/network_pf.c +++ b/src/network/network_pf.c @@ -165,7 +165,7 @@ pfAddNatFirewallRules(virNetworkDef *def, * block log on virbr0 */ int prefix = virNetworkIPDefPrefix(ipdef); - g_autofree const char *forwardIf = g_strdup(virNetworkDefForwardIf(def, 0)); + g_autofree char *forwardIf = g_strdup(virNetworkDefForwardIf(def, 0)); g_auto(virBuffer) pf_rules_buf = VIR_BUFFER_INITIALIZER; g_autoptr(virCommand) cmd = virCommandNew(PFCTL); g_autoptr(virCommand) flush_cmd = virCommandNew(PFCTL);