]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
nwfilter: Fix return type of virNWFilterCanApplyBasicRules callback
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 14 May 2025 13:35:01 +0000 (15:35 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 15 May 2025 08:49:23 +0000 (10:49 +0200)
The virNWFilterCanApplyBasicRules() callback returns an int but
in fact its return type is a boolean. Even its only
implementation (ebiptablesCanApplyBasicRules()) returns a
boolean. Switch the return type from integer to boolean.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/nwfilter/nwfilter_ebiptables_driver.c
src/nwfilter/nwfilter_tech_driver.h

index 5082b625773289f02acace72f75cabd31e0a6240..067df6e612d82a35ff5a48ad15dc9f8aa9e24fd2 100644 (file)
@@ -2797,7 +2797,7 @@ ebtablesRenameTmpSubAndRootChainsFW(virFirewall *fw,
  * run ebtablesApplyBasicRules and ebtablesApplyDHCPOnlyRules.
  * In case of this driver we need the ebtables tool available.
  */
-static int
+static bool
 ebiptablesCanApplyBasicRules(void)
 {
     return true;
index 8de9eda9476775ad4e170a0d5f709f6c0074d651..a4af0bf6d5a7ffa43588b35eb79efdd00869154e 100644 (file)
@@ -51,7 +51,7 @@ typedef int (*virNWFilterRuleTeardownOldRules)(const char *ifname);
 
 typedef int (*virNWFilterRuleAllTeardown)(const char *ifname);
 
-typedef int (*virNWFilterCanApplyBasicRules)(void);
+typedef bool (*virNWFilterCanApplyBasicRules)(void);
 
 typedef int (*virNWFilterApplyBasicRules)(const char *ifname,
                                           const virMacAddr *macaddr);