diff mbox

[PULL,v1,1/5] io: fix sign of errno value passed to error report

Message ID 1453291293-2821-2-git-send-email-berrange@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel P. Berrangé Jan. 20, 2016, 12:01 p.m. UTC
When reporting the number of FDs has been exceeded, pass
EINVAL to error_setg_errno, rather than -EINVAL.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 io/channel-socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/io/channel-socket.c b/io/channel-socket.c
index 10a5b31..eaa411f 100644
--- a/io/channel-socket.c
+++ b/io/channel-socket.c
@@ -502,7 +502,7 @@  static ssize_t qio_channel_socket_writev(QIOChannel *ioc,
 
     if (nfds) {
         if (nfds > SOCKET_MAX_FDS) {
-            error_setg_errno(errp, -EINVAL,
+            error_setg_errno(errp, EINVAL,
                              "Only %d FDs can be sent, got %zu",
                              SOCKET_MAX_FDS, nfds);
             return -1;