diff options
author | John Levon <john.levon@nutanix.com> | 2021-04-13 10:35:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-13 10:35:59 +0100 |
commit | 451b4180c18722b11047ba6c7554e24dde0004f9 (patch) | |
tree | b4c14a5bc834701f5fff7fc7fc498c7b023d9c7b /lib/pci.c | |
parent | 944da3686dc5e70e104fadf0d3acd616312d1388 (diff) | |
download | libvfio-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.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -33,6 +33,7 @@ #include <assert.h> #include <errno.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> #include <sys/param.h> |