Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: virtio: Fix VIRTIO ROLE_XXXX macro definitions
Add parentheses around the "vdev" parameter to avoid side effects. This fixes a build error when using the macro in the following way: if (VIRTIO_ROLE_IS_DEVICE(&my_context->vdev)) The error encountered: openamp/open-amp/lib/include/openamp/virtio.h:89:49: error: invalid type argument of ‘->’ (have ‘struct virtio_device’) 89 | (VIRTIO_ENABLED(VIRTIO_DRIVER_SUPPORT) && (vdev->role) == VIRTIO_DEV_DRIVER) Signed-off-by: Arnaud Pouliquen <[email protected]>
- Loading branch information