From 0ac385bd6c160d10fd6d85814425a3dc9fe699fc Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 30 Jun 2011 17:05:19 -0600 Subject: [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 0ef81fd180..5e1719bec5 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 f4edde9f4d..eec996bcde 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: -- GitLab