From 0e4d4afb074f1c809391c31644de377c671dcafb Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Fri, 27 May 2011 11:25:01 +0100 Subject: [PATCH] Remove unused 'target' field in virDomainHostdevDef The virDomainHostdevDef struct contains a 'char *target' field. This is set to 'NULL' when parsing XML and never used / set anywhere else. Clearly it is bogus & unused * src/conf/domain_conf.c, src/conf/domain_conf.h: Remove target from virDomainHostdevDef --- src/conf/domain_conf.c | 2 -- src/conf/domain_conf.h | 1 - 2 files changed, 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b30acc836c..1632dc0859 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -893,7 +893,6 @@ void virDomainHostdevDefFree(virDomainHostdevDefPtr def) if (!def) return; - VIR_FREE(def->target); virDomainDeviceInfoClear(&def->info); VIR_FREE(def); } @@ -4774,7 +4773,6 @@ virDomainHostdevDefParseXML(const xmlNodePtr node, virReportOOMError(); return NULL; } - def->target = NULL; mode = virXMLPropString(node, "mode"); if (mode) { diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 8c94d4db4d..8ea1ca4de6 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -792,7 +792,6 @@ struct _virDomainHostdevDef { int dummy; } caps; } source; - char* target; int bootIndex; virDomainDeviceInfo info; /* Guest address */ }; -- GitLab