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

[libvirt] [PATCH] build: remove dead variables



Detected by Coverity.  No real harm in leaving these, but fixing
them cuts down on the noise for future analysis.

* src/rpc/virnetserver.c (virNetServerAddService): Delete unused
entry.
* src/util/sysinfo.c (virSysinfoRead): Delete dead assignment to
base.
---
 src/rpc/virnetserver.c |    7 +++----
 src/util/sysinfo.c     |    2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c
index 0ef81fd..5e1719b 100644
--- a/src/rpc/virnetserver.c
+++ b/src/rpc/virnetserver.c
@@ -529,11 +529,10 @@ int virNetServerAddService(virNetServerPtr srv,
 #if HAVE_AVAHI
     if (mdnsEntryName) {
         int port = virNetServerServiceGetPort(svc);
-        virNetServerMDNSEntryPtr entry;

-        if (!(entry = virNetServerMDNSAddEntry(srv->mdnsGroup,
-                                               mdnsEntryName,
-                                               port)))
+        if (!virNetServerMDNSAddEntry(srv->mdnsGroup,
+                                      mdnsEntryName,
+                                      port))
             goto error;
     }
 #endif
diff --git a/src/util/sysinfo.c b/src/util/sysinfo.c
index f4edde9..eec996b 100644
--- a/src/util/sysinfo.c
+++ b/src/util/sysinfo.c
@@ -472,7 +472,7 @@ virSysinfoRead(void) {

     ret->nmemory = 0;
     ret->memory = NULL;
-    if ((base = virSysinfoParseMemory(base, ret)) == NULL)
+    if (virSysinfoParseMemory(base, ret) == NULL)
         goto no_memory;

 cleanup:
-- 
1.7.4.4


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