]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
nwfilter: Remove Coverity DEADCODE warning
authorJohn Ferlan <jferlan@redhat.com>
Mon, 2 Dec 2013 19:36:51 +0000 (14:36 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 4 Dec 2013 11:27:19 +0000 (06:27 -0500)
The nwfilterStateInitialize() would only assign sysbus inside
a WITH_DBUS conditional, thus leaving a subsequent check for sysbus
and nwfilterDriverInstallDBusMatches() as a no-op

Rather than try to add WITH_DBUS conditions which ended up conflicting
with the usage of HAVE_FIREWALLD conditionals, just remove the WITH_DBUS
since virdbus.c has entry points for with and without conditions.

src/nwfilter/nwfilter_driver.c

index d521adffed8fed086059e6b19c057879681b32bf..d21dd82ac5b6e03f79a9c5dfb9e8bc2671f9fc85 100644 (file)
@@ -177,11 +177,9 @@ nwfilterStateInitialize(bool privileged,
     if (!privileged)
         return 0;
 
-#if WITH_DBUS
     if (virDBusHasSystemBus() &&
         !(sysbus = virDBusGetSystemBus()))
         return -1;
-#endif /* WITH_DBUS */
 
     if (VIR_ALLOC(driverState) < 0)
         return -1;