]> Git Repo - qemu.git/commitdiff
io: fix sign of errno value passed to error report
authorDaniel P. Berrange <[email protected]>
Mon, 11 Jan 2016 12:59:44 +0000 (12:59 +0000)
committerDaniel P. Berrange <[email protected]>
Tue, 19 Jan 2016 14:03:27 +0000 (14:03 +0000)
When reporting the number of FDs has been exceeded, pass
EINVAL to error_setg_errno, rather than -EINVAL.

Signed-off-by: Daniel P. Berrange <[email protected]>
io/channel-socket.c

index 10a5b3136ee0683607501b47ed3a14e7ccd5b824..eaa411f3d28b1978d16afbf6e467993c9205e989 100644 (file)
@@ -502,7 +502,7 @@ static ssize_t qio_channel_socket_writev(QIOChannel *ioc,
 
     if (nfds) {
         if (nfds > SOCKET_MAX_FDS) {
 
     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;
                              "Only %d FDs can be sent, got %zu",
                              SOCKET_MAX_FDS, nfds);
             return -1;
This page took 0.023882 seconds and 4 git commands to generate.