vhost: fix logically dead code
authorHuawei Xie <huawei.xie@intel.com>
Thu, 10 Dec 2015 17:57:20 +0000 (01:57 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 13 Dec 2015 01:14:30 +0000 (02:14 +0100)
CID 107107 (#1 of 1): Logically dead code
Fixes: af4f2c5feb2e ("vhost: fix code style")

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
lib/librte_vhost/virtio-net.c

index 8364938..de78a0f 100644 (file)
@@ -863,8 +863,7 @@ int rte_vhost_enable_guest_notification(struct virtio_net *dev,
                return -1;
        }
 
-       dev->virtqueue[queue_id]->used->flags =
-               enable ? 0 : VRING_USED_F_NO_NOTIFY;
+       dev->virtqueue[queue_id]->used->flags = VRING_USED_F_NO_NOTIFY;
        return 0;
 }