Message ID | 20220420073119.16974-2-jgross@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | tools/libs: don't set errno to negative values | expand |
On 20/04/2022 08:31, Juergen Gross wrote: > Setting errno to a negative value makes no sense. Fixes: 6b6500b3cbaa > Signed-off-by: Juergen Gross <jgross@suse.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff --git a/tools/libs/evtchn/freebsd.c b/tools/libs/evtchn/freebsd.c index c4d075350b..422836f1a1 100644 --- a/tools/libs/evtchn/freebsd.c +++ b/tools/libs/evtchn/freebsd.c @@ -58,7 +58,7 @@ int osdep_evtchn_close(xenevtchn_handle *xce) int osdep_evtchn_restrict(xenevtchn_handle *xce, domid_t domid) { - errno = -EOPNOTSUPP; + errno = EOPNOTSUPP; return -1; } diff --git a/tools/libs/evtchn/minios.c b/tools/libs/evtchn/minios.c index 65cfccfd09..8ff46de884 100644 --- a/tools/libs/evtchn/minios.c +++ b/tools/libs/evtchn/minios.c @@ -143,7 +143,7 @@ int osdep_evtchn_close(xenevtchn_handle *xce) int osdep_evtchn_restrict(xenevtchn_handle *xce, domid_t domid) { - errno = -EOPNOTSUPP; + errno = EOPNOTSUPP; return -1; } diff --git a/tools/libs/evtchn/netbsd.c b/tools/libs/evtchn/netbsd.c index 0b223c4beb..2de9cefc67 100644 --- a/tools/libs/evtchn/netbsd.c +++ b/tools/libs/evtchn/netbsd.c @@ -53,7 +53,7 @@ int osdep_evtchn_close(xenevtchn_handle *xce) int osdep_evtchn_restrict(xenevtchn_handle *xce, domid_t domid) { - errno = -EOPNOTSUPP; + errno = EOPNOTSUPP; return -1; } diff --git a/tools/libs/evtchn/solaris.c b/tools/libs/evtchn/solaris.c index 7fef88a73e..375a5f9b4f 100644 --- a/tools/libs/evtchn/solaris.c +++ b/tools/libs/evtchn/solaris.c @@ -53,7 +53,7 @@ int osdep_evtchn_close(xenevtchn_handle *xce) int osdep_evtchn_restrict(xenevtchn_handle *xce, domid_t domid) { - errno = -EOPNOTSUPP; + errno = EOPNOTSUPP; return -1; }
Setting errno to a negative value makes no sense. Signed-off-by: Juergen Gross <jgross@suse.com> --- tools/libs/evtchn/freebsd.c | 2 +- tools/libs/evtchn/minios.c | 2 +- tools/libs/evtchn/netbsd.c | 2 +- tools/libs/evtchn/solaris.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)