aboutsummaryrefslogtreecommitdiff
path: root/lib/pci.c
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2021-04-13 10:35:59 +0100
committerGitHub <noreply@github.com>2021-04-13 10:35:59 +0100
commit451b4180c18722b11047ba6c7554e24dde0004f9 (patch)
treeb4c14a5bc834701f5fff7fc7fc498c7b023d9c7b /lib/pci.c
parent944da3686dc5e70e104fadf0d3acd616312d1388 (diff)
downloadlibvfio-user-451b4180c18722b11047ba6c7554e24dde0004f9.zip
libvfio-user-451b4180c18722b11047ba6c7554e24dde0004f9.tar.gz
libvfio-user-451b4180c18722b11047ba6c7554e24dde0004f9.tar.bz2
dma: use ERROR_INT()
The first in a series excising the use of the "return -errno" idiom. This is a non-standard usage, and in userspace, we have "errno" for delivering side-band error values. As there have been multiple bugs from not using standard error return methods like -1+errno or NULL+errno, let's do that. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib/pci.c')
-rw-r--r--lib/pci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pci.c b/lib/pci.c
index 39470d9..54e90f9 100644
--- a/lib/pci.c
+++ b/lib/pci.c
@@ -33,6 +33,7 @@
#include <assert.h>
#include <errno.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <sys/param.h>