Re: [PATCH 3/8] rpc: silence coverity warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 2011-7-2 7:36, Eric Blake write:
Coverity noted that 4 out of 5 calls to virNetClientStreamRaiseError
checked the return value.  This case expects a particular value, so
warn if our expectations went wrong due to some bug elsewhere.

* src/rpc/virnetclient.c (virNetClientCallDispatchStream): Warn on
unexpected scenario.
---
  src/rpc/virnetclient.c |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c
index b551b99..615de6c 100644
--- a/src/rpc/virnetclient.c
+++ b/src/rpc/virnetclient.c
@@ -602,7 +602,8 @@ static int virNetClientCallDispatchStream(virNetClientPtr client)
          if (thecall&&  thecall->expectReply) {
              VIR_DEBUG("Got a synchronous error");
              /* Raise error now, so that this call will see it immediately */
-            virNetClientStreamRaiseError(st);
+            if (!virNetClientStreamRaiseError(st))
+                VIR_DEBUG("unable to raise synchronous error");
              thecall->mode = VIR_NET_CLIENT_MODE_COMPLETE;
          }
          return 0;
ACK

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]