aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2021-12-22 10:17:11 +0000
committerGitHub <noreply@github.com>2021-12-22 10:17:11 +0000
commit17769cf1af093dfb4b9bc3347ae39324029989ac (patch)
tree6e5da3b6b12082e843e979f6702cc18242571bb7 /lib
parent190dcbde2872b57600088606785b75259b69efce (diff)
downloadlibvfio-user-17769cf1af093dfb4b9bc3347ae39324029989ac.zip
libvfio-user-17769cf1af093dfb4b9bc3347ae39324029989ac.tar.gz
libvfio-user-17769cf1af093dfb4b9bc3347ae39324029989ac.tar.bz2
fix coverity issues (#636)
Fix three remaining low priority coverity issues; they do not represent bugs. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/libvfio-user.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libvfio-user.c b/lib/libvfio-user.c
index f1c99ec..e4abfad 100644
--- a/lib/libvfio-user.c
+++ b/lib/libvfio-user.c
@@ -2013,6 +2013,7 @@ vfu_dma_transfer(vfu_ctx_t *vfu_ctx, enum vfio_user_command cmd,
size_t rlen;
void *rbuf;
+ assert(cmd == VFIO_USER_DMA_READ || cmd == VFIO_USER_DMA_WRITE);
assert(vfu_ctx != NULL);
assert(sg != NULL);