diff mbox

[dpdk-dev,4/4] vhost: Fix Coverity issue with logically dead code

Message ID 1449770240-103240-6-git-send-email-huawei.xie@intel.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Huawei@dpdk.org, Xie@dpdk.org Dec. 10, 2015, 5:57 p.m. UTC
CID 107107 (#1 of 1): Logically dead code
Fixes: af4f2c5feb2e ("vhost: fix code style")

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
---
 lib/librte_vhost/virtio-net.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Mcnamara, John Dec. 11, 2015, 2:54 p.m. UTC | #1
> -----Original Message-----
> From: Huawei Xie
> Sent: Thursday, December 10, 2015 5:57 PM
> To: dev@dpdk.org
> Cc: Mcnamara, John; Xie, Huawei
> Subject: [PATCH 4/4] vhost: Fix Coverity issue with logically dead code
> 
> 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>
diff mbox

Patch

diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c
index 8364938..de78a0f 100644
--- a/lib/librte_vhost/virtio-net.c
+++ b/lib/librte_vhost/virtio-net.c
@@ -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;
 }