[PATCH] nwfilter: drop dead code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
---

Pushing under the trivial rule.

 src/nwfilter/nwfilter_dhcpsnoop.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcpsnoop.c
index 3321d0b..e4c895f 100644
--- a/src/nwfilter/nwfilter_dhcpsnoop.c
+++ b/src/nwfilter/nwfilter_dhcpsnoop.c
@@ -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)"),
-- 
1.7.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]