vhost-user-test: fix features mask

VIRTIO_NET_F_MAC is a bit position, not a bit mask.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
master
Maxime Coquelin 2017-12-21 22:21:21 +01:00 committed by Michael S. Tsirkin
parent 6cf6fe394a
commit 0d85e7d99a
1 changed files with 1 additions and 1 deletions

View File

@ -177,7 +177,7 @@ static void init_virtio_dev(TestServer *s)
qvirtio_set_driver(&dev->vdev);
features = qvirtio_get_features(&dev->vdev);
features = features & VIRTIO_NET_F_MAC;
features = features & (1u << VIRTIO_NET_F_MAC);
qvirtio_set_features(&dev->vdev, features);
qvirtio_set_driver_ok(&dev->vdev);