]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
nwfilter: drop dead code
authorEric Blake <eblake@redhat.com>
Wed, 28 Nov 2012 16:20:49 +0000 (09:20 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 28 Nov 2012 16:21:33 +0000 (09:21 -0700)
Commit cb022152 went overboard and introduced a dead conditional
while trying to get rid of a potential NULL dereference.

* src/nwfilter/nwfilter_dhcpsnoop.c (virNWFilterSnoopReqNew):
Remove redundant conditional.

src/nwfilter/nwfilter_dhcpsnoop.c

index 3321d0bf233f6f336a9722f948d053f96cd46d58..e4c895fc4d21799605f3e1a6c8010022b1690352 100644 (file)
@@ -573,7 +573,7 @@ virNWFilterSnoopReqNew(const char *ifkey)
 {
     virNWFilterSnoopReqPtr req;
 
-    if (ifkey == NULL || (ifkey && (strlen(ifkey) != VIR_IFKEY_LEN - 1))) {
+    if (ifkey == NULL || strlen(ifkey) != VIR_IFKEY_LEN - 1) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("virNWFilterSnoopReqNew called with invalid "
                          "key \"%s\" (%zu)"),