[dpdk-dev,4/4] vhost: Fix Coverity issue with logically dead code
Commit Message
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
> -----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>
@@ -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;
}