1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-26 03:21:44 +03:00

VIR_XPATH_NODE_AUTORESTORE: remove semicolon from users

Since the macro no longer includes the 'ignore_value'
statement, stop putting another empty statement after it.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Ján Tomko 2020-07-28 21:47:48 +02:00
parent 8cc177fc5d
commit 52cd849e62
23 changed files with 112 additions and 111 deletions

View File

@ -102,7 +102,7 @@ virDomainBackupDiskDefParseXML(xmlNodePtr node,
unsigned int flags,
virDomainXMLOptionPtr xmlopt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
g_autofree char *type = NULL;
g_autofree char *driver = NULL;
g_autofree char *backup = NULL;

View File

@ -96,7 +96,7 @@ virDomainCheckpointDiskDefParseXML(xmlNodePtr node,
virDomainCheckpointDiskDefPtr def)
{
g_autofree char *checkpoint = NULL;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
ctxt->node = node;

View File

@ -327,7 +327,7 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt,
{
g_autoptr(virCPUDef) def = NULL;
g_autofree xmlNodePtr *nodes = NULL;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int n;
size_t i;
g_autofree char *cpuMode = NULL;

View File

@ -8350,7 +8350,7 @@ virDomainHostdevSubsysSCSIiSCSIDefParseXML(xmlNodePtr sourcenode,
virDomainHostdevSubsysSCSIiSCSIPtr iscsisrc = &def->u.iscsi;
g_autoptr(virStorageAuthDef) authdef = NULL;
xmlNodePtr node;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
ctxt->node = sourcenode;
@ -8840,7 +8840,7 @@ virDomainNetDefCoalesceParseXML(xmlNodePtr node,
xmlXPathContextPtr ctxt)
{
virNetDevCoalescePtr ret = NULL;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
unsigned long long tmp = 0;
g_autofree char *str = NULL;
@ -9211,7 +9211,7 @@ virSecurityLabelDefsParseXML(virDomainDefPtr def,
virDomainXMLOptionPtr xmlopt,
unsigned int flags)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
size_t i = 0, j;
int n;
g_autofree xmlNodePtr *list = NULL;
@ -9309,7 +9309,7 @@ virSecurityDeviceLabelDefParseXML(virSecurityDeviceLabelDefPtr **seclabels_rtn,
xmlXPathContextPtr ctxt,
unsigned int flags)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
virSecurityDeviceLabelDefPtr *seclabels = NULL;
size_t nseclabels = 0;
int n;
@ -9507,7 +9507,7 @@ static virStorageNetCookieDefPtr
virDomainStorageNetCookieParse(xmlNodePtr node,
xmlXPathContextPtr ctxt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
g_autoptr(virStorageNetCookieDef) cookie = NULL;
ctxt->node = node;
@ -9534,7 +9534,7 @@ virDomainStorageNetCookiesParse(xmlNodePtr node,
xmlXPathContextPtr ctxt,
virStorageSourcePtr src)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
g_autofree xmlNodePtr *nodes = NULL;
ssize_t nnodes;
size_t i;
@ -9751,7 +9751,7 @@ virDomainDiskSourcePRParse(xmlNodePtr node,
xmlXPathContextPtr ctxt,
virStoragePRDefPtr *pr)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
ctxt->node = node;
@ -9806,7 +9806,7 @@ static virStorageSourceSlicePtr
virDomainStorageSourceParseSlice(xmlNodePtr node,
xmlXPathContextPtr ctxt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
g_autofree char *offset = NULL;
g_autofree char *size = NULL;
g_autofree virStorageSourceSlicePtr ret = g_new0(virStorageSourceSlice, 1);
@ -9872,7 +9872,7 @@ virDomainStorageSourceParse(xmlNodePtr node,
unsigned int flags,
virDomainXMLOptionPtr xmlopt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr tmp;
ctxt->node = node;
@ -9950,7 +9950,7 @@ virDomainDiskBackingStoreParse(xmlXPathContextPtr ctxt,
unsigned int flags,
virDomainXMLOptionPtr xmlopt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr source;
g_autoptr(virStorageSource) backingStore = NULL;
g_autofree char *type = NULL;
@ -10088,7 +10088,7 @@ virDomainDiskDefMirrorParse(virDomainDiskDefPtr def,
virDomainXMLOptionPtr xmlopt)
{
xmlNodePtr mirrorNode;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
g_autofree char *mirrorFormat = NULL;
g_autofree char *mirrorType = NULL;
g_autofree char *ready = NULL;
@ -10457,7 +10457,7 @@ virDomainDiskDefParsePrivateData(xmlXPathContextPtr ctxt,
virDomainXMLOptionPtr xmlopt)
{
xmlNodePtr private_node = virXPathNode("./privateData", ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
if (!xmlopt ||
!xmlopt->privateData.diskParse ||
@ -10484,7 +10484,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
{
virDomainDiskDefPtr def;
xmlNodePtr cur;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
bool source = false;
virStorageEncryptionPtr encryption = NULL;
g_autoptr(virStorageAuthDef) authdef = NULL;
@ -11091,7 +11091,7 @@ virDomainControllerDefParseXML(virDomainXMLOptionPtr xmlopt,
bool processedTarget = false;
int numaNode = -1;
int ports = -1;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int rc;
g_autofree char *typeStr = NULL;
g_autofree char *idx = NULL;
@ -11477,7 +11477,7 @@ virDomainFSDefParseXML(virDomainXMLOptionPtr xmlopt,
xmlXPathContextPtr ctxt,
unsigned int flags)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
virDomainFSDefPtr def;
xmlNodePtr cur;
g_autofree char *type = NULL;
@ -11729,7 +11729,7 @@ virDomainActualNetDefParseXML(xmlNodePtr node,
{
virDomainActualNetDefPtr actual = NULL;
int ret = -1;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr bandwidth_node = NULL;
xmlNodePtr vlanNode;
xmlNodePtr virtPortNode;
@ -11929,7 +11929,7 @@ virDomainChrSourceReconnectDefParseXML(virDomainChrSourceReconnectDefPtr def,
xmlXPathContextPtr ctxt)
{
int tmpVal;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr cur;
g_autofree char *tmp = NULL;
@ -11980,7 +11980,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
xmlNodePtr tmpNode;
virHashTablePtr filterparams = NULL;
virDomainActualNetDefPtr actual = NULL;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
virDomainChrSourceReconnectDef reconnect = {0};
int rv, val;
g_autofree char *macaddr = NULL;
@ -13302,7 +13302,7 @@ virDomainChrSourceDefParseXML(virDomainChrSourceDefPtr def,
/* Check for an optional seclabel override in <source/>. */
if (chr_def) {
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
ctxt->node = cur;
if (virSecurityDeviceLabelDefParseXML(&def->seclabels,
&def->nseclabels,
@ -13675,7 +13675,7 @@ virDomainTPMDefParseXML(virDomainXMLOptionPtr xmlopt,
unsigned int flags)
{
virDomainTPMDefPtr def;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int nbackends;
g_autofree char *path = NULL;
g_autofree char *model = NULL;
@ -13808,7 +13808,7 @@ virDomainInputDefParseXML(virDomainXMLOptionPtr xmlopt,
xmlXPathContextPtr ctxt,
unsigned int flags)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
virDomainInputDefPtr def;
g_autofree char *evdev = NULL;
g_autofree char *type = NULL;
@ -14003,7 +14003,7 @@ virDomainTimerDefParseXML(xmlNodePtr node,
xmlXPathContextPtr ctxt)
{
virDomainTimerDefPtr def;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr catchup;
int ret;
g_autofree char *name = NULL;
@ -14350,7 +14350,7 @@ virDomainGraphicsListensParseXML(virDomainGraphicsDefPtr def,
xmlXPathContextPtr ctxt,
unsigned int flags)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
virDomainGraphicsListenDef newListen = {0};
int nListens;
int ret = -1;
@ -14507,7 +14507,7 @@ virDomainGraphicsDefParseXMLSDL(virDomainGraphicsDefPtr def,
xmlNodePtr node,
xmlXPathContextPtr ctxt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int enableVal;
xmlNodePtr glNode;
g_autofree char *fullscreen = virXMLPropString(node, "fullscreen");
@ -14896,7 +14896,7 @@ virDomainGraphicsDefParseXMLEGLHeadless(virDomainGraphicsDefPtr def,
xmlNodePtr node,
xmlXPathContextPtr ctxt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr glNode;
ctxt->node = node;
@ -15041,7 +15041,7 @@ virDomainSoundDefParseXML(virDomainXMLOptionPtr xmlopt,
unsigned int flags)
{
virDomainSoundDefPtr def;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
g_autofree char *model = NULL;
xmlNodePtr audioNode;
@ -15152,7 +15152,7 @@ virDomainAudioDefParseXML(virDomainXMLOptionPtr xmlopt G_GNUC_UNUSED,
xmlXPathContextPtr ctxt G_GNUC_UNUSED)
{
virDomainAudioDefPtr def;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
g_autofree char *tmp = NULL;
g_autofree char *type = NULL;
@ -15259,7 +15259,7 @@ virDomainRNGDefParseXML(virDomainXMLOptionPtr xmlopt,
unsigned int flags)
{
virDomainRNGDefPtr def;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int nbackends;
g_autofree xmlNodePtr *backends = NULL;
g_autofree char *model = NULL;
@ -15372,7 +15372,7 @@ virDomainMemballoonDefParseXML(virDomainXMLOptionPtr xmlopt,
unsigned int flags)
{
virDomainMemballoonDefPtr def;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
unsigned int period = 0;
g_autofree char *model = NULL;
g_autofree char *deflate = NULL;
@ -15457,7 +15457,7 @@ virDomainShmemDefParseXML(virDomainXMLOptionPtr xmlopt,
virDomainShmemDefPtr def = NULL;
virDomainShmemDefPtr ret = NULL;
xmlNodePtr msi = NULL;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr server = NULL;
g_autofree char *tmp = NULL;
@ -15560,7 +15560,7 @@ virSysinfoBIOSParseXML(xmlNodePtr node,
xmlXPathContextPtr ctxt,
virSysinfoBIOSDefPtr *bios)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int ret = -1;
virSysinfoBIOSDefPtr def;
@ -15623,7 +15623,7 @@ virSysinfoSystemParseXML(xmlNodePtr node,
unsigned char *domUUID,
bool uuid_generated)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int ret = -1;
virSysinfoSystemDefPtr def;
g_autofree char *tmpUUID = NULL;
@ -15697,7 +15697,7 @@ virSysinfoBaseBoardParseXML(xmlXPathContextPtr ctxt,
size_t *nbaseBoard)
{
size_t i, nboards = 0;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int n;
g_autofree virSysinfoBaseBoardDefPtr boards = NULL;
g_autofree xmlNodePtr *nodes = NULL;
@ -15746,7 +15746,7 @@ virSysinfoOEMStringsParseXML(xmlNodePtr node,
xmlXPathContextPtr ctxt,
virSysinfoOEMStringsDefPtr *oem)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int ret = -1;
virSysinfoOEMStringsDefPtr def;
int nstrings;
@ -15786,7 +15786,7 @@ virSysinfoChassisParseXML(xmlNodePtr node,
xmlXPathContextPtr ctxt,
virSysinfoChassisDefPtr *chassisdef)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int ret = -1;
virSysinfoChassisDefPtr def;
@ -15872,7 +15872,7 @@ virSysinfoParseFWCfgDef(virSysinfoDefPtr def,
xmlNodePtr node,
xmlXPathContextPtr ctxt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
g_autofree xmlNodePtr *nodes = NULL;
int n;
size_t i;
@ -15933,7 +15933,7 @@ virSysinfoParseXML(xmlNodePtr node,
unsigned char *domUUID,
bool uuid_generated)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
virSysinfoDefPtr def;
g_autofree char *typeStr = NULL;
int type;
@ -16146,7 +16146,7 @@ virDomainVideoDefParseXML(virDomainXMLOptionPtr xmlopt,
{
virDomainVideoDefPtr def;
xmlNodePtr cur;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
g_autofree char *type = NULL;
g_autofree char *driver_name = NULL;
g_autofree char *heads = NULL;
@ -16301,7 +16301,7 @@ virDomainHostdevDefParseXML(virDomainXMLOptionPtr xmlopt,
unsigned int flags)
{
virDomainHostdevDefPtr def;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
g_autofree char *mode = virXMLPropString(node, "mode");
g_autofree char *type = virXMLPropString(node, "type");
@ -16565,7 +16565,7 @@ virDomainRedirFilterDefParseXML(xmlNodePtr node,
{
int n;
size_t i;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
virDomainRedirFilterDefPtr def = NULL;
g_autofree xmlNodePtr *nodes = NULL;
@ -16703,7 +16703,7 @@ virDomainMemorySourceDefParseXML(xmlNodePtr node,
xmlXPathContextPtr ctxt,
virDomainMemoryDefPtr def)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
g_autofree char *nodemask = NULL;
ctxt->node = node;
@ -16757,10 +16757,11 @@ virDomainMemoryTargetDefParseXML(xmlNodePtr node,
xmlXPathContextPtr ctxt,
virDomainMemoryDefPtr def)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
ctxt->node = node;
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int rv;
ctxt->node = node;
/* initialize to value which marks that the user didn't specify it */
def->targetNode = -1;
@ -16804,7 +16805,7 @@ static virDomainSEVDefPtr
virDomainSEVDefParseXML(xmlNodePtr sevNode,
xmlXPathContextPtr ctxt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
virDomainSEVDefPtr def;
unsigned long policy;
g_autofree char *type = NULL;
@ -16870,7 +16871,7 @@ virDomainMemoryDefParseXML(virDomainXMLOptionPtr xmlopt,
const virDomainDef *dom,
unsigned int flags)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr node;
virDomainMemoryDefPtr def;
int val;
@ -16965,7 +16966,7 @@ static virDomainIOMMUDefPtr
virDomainIOMMUDefParseXML(xmlNodePtr node,
xmlXPathContextPtr ctxt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr driver;
int val;
g_autofree char *tmp = NULL;
@ -17045,7 +17046,7 @@ virDomainVsockDefParseXML(virDomainXMLOptionPtr xmlopt,
xmlXPathContextPtr ctxt,
unsigned int flags)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr cid;
int val;
g_autofree char *tmp = NULL;
@ -18972,7 +18973,7 @@ virDomainIdmapDefParseXML(xmlXPathContextPtr ctxt,
{
size_t i;
virDomainIdMapEntryPtr idmap = NULL;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
if (VIR_ALLOC_N(idmap, num) < 0)
return idmap;
@ -19371,7 +19372,7 @@ virDomainHugepagesParseXML(xmlNodePtr node,
xmlXPathContextPtr ctxt,
virDomainHugePagePtr hugepage)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
g_autofree char *nodeset = NULL;
ctxt->node = node;
@ -19406,7 +19407,7 @@ static virDomainResourceDefPtr
virDomainResourceDefParse(xmlNodePtr node,
xmlXPathContextPtr ctxt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
virDomainResourceDefPtr def = NULL;
ctxt->node = node;
@ -20588,7 +20589,7 @@ virDomainCachetuneDefParseCache(xmlXPathContextPtr ctxt,
xmlNodePtr node,
virResctrlAllocPtr alloc)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
unsigned int level;
unsigned int cache;
int type;
@ -20732,7 +20733,7 @@ virDomainResctrlMonDefParse(virDomainDefPtr def,
virDomainResctrlDefPtr resctrl)
{
virDomainResctrlMonDefPtr domresmon = NULL;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
unsigned int level = 0;
size_t i = 0;
int n = 0;
@ -20886,7 +20887,7 @@ virDomainCachetuneDefParse(virDomainDefPtr def,
xmlNodePtr node,
unsigned int flags)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
virDomainResctrlDefPtr resctrl = NULL;
ssize_t i = 0;
int n;
@ -21028,7 +21029,7 @@ virDomainMemorytuneDefParseMemory(xmlXPathContextPtr ctxt,
xmlNodePtr node,
virResctrlAllocPtr alloc)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
unsigned int id;
unsigned int bandwidth;
g_autofree char *tmp = NULL;
@ -21074,7 +21075,7 @@ virDomainMemorytuneDefParse(virDomainDefPtr def,
xmlNodePtr node,
unsigned int flags)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
virDomainResctrlDefPtr resctrl = NULL;
virDomainResctrlDefPtr newresctrl = NULL;
g_autoptr(virBitmap) vcpus = NULL;

View File

@ -262,7 +262,7 @@ static int
virInterfaceDefParseDhcp(virInterfaceProtocolDefPtr def,
xmlNodePtr dhcp, xmlXPathContextPtr ctxt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
char *tmp;
int ret = 0;
@ -424,7 +424,7 @@ static int
virInterfaceDefParseIfAdressing(virInterfaceDefPtr def,
xmlXPathContextPtr ctxt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr *protoNodes = NULL;
int nProtoNodes, pp, ret = -1;
char *tmp;
@ -553,7 +553,7 @@ virInterfaceDefParseBondItfs(virInterfaceDefPtr def,
xmlXPathContextPtr ctxt)
{
xmlNodePtr *interfaces = NULL;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
virInterfaceDefPtr itf;
int nbItf;
size_t i;
@ -692,7 +692,7 @@ virInterfaceDefParseXML(xmlXPathContextPtr ctxt,
virInterfaceDefPtr def;
int type;
char *tmp;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr lnk;

View File

@ -33,7 +33,7 @@ int
virNetDevVlanParse(xmlNodePtr node, xmlXPathContextPtr ctxt, virNetDevVlanPtr def)
{
int ret = -1;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
char *trunk = NULL;
char *nativeMode = NULL;
xmlNodePtr *tagNodes = NULL;

View File

@ -782,7 +782,7 @@ virNetworkDNSSrvDefParseXML(const char *networkName,
bool partialOkay)
{
int ret;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
ctxt->node = node;
@ -940,7 +940,7 @@ virNetworkDNSDefParseXML(const char *networkName,
g_autofree char *enable = NULL;
int nhosts, nsrvs, ntxts, nfwds;
size_t i;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
ctxt->node = node;
@ -1084,7 +1084,7 @@ virNetworkIPDefParseXML(const char *networkName,
* On failure clear it out, but don't free it.
*/
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr dhcp;
g_autofree char *address = NULL;
g_autofree char *netmask = NULL;
@ -1255,7 +1255,7 @@ virNetworkPortGroupParseXML(virPortGroupDefPtr def,
* On failure clear it out, but don't free it.
*/
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr virtPortNode;
xmlNodePtr vlanNode;
xmlNodePtr bandwidth_node;
@ -1325,7 +1325,7 @@ virNetworkForwardNatDefParseXML(const char *networkName,
g_autofree char *addrStart = NULL;
g_autofree char *addrEnd = NULL;
g_autofree char *ipv6 = NULL;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
ctxt->node = node;
@ -1463,7 +1463,7 @@ virNetworkForwardDefParseXML(const char *networkName,
g_autofree char *forwardManaged = NULL;
g_autofree char *forwardDriverName = NULL;
g_autofree char *type = NULL;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
ctxt->node = node;
@ -1702,7 +1702,7 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt,
xmlNodePtr forwardNode = NULL;
g_autofree char *ipv6nogwStr = NULL;
g_autofree char *trustGuestRxFilters = NULL;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr bandwidthNode = NULL;
xmlNodePtr vlanNode;
xmlNodePtr metadataNode = NULL;

View File

@ -228,7 +228,7 @@ virNetDevIPRouteParseXML(const char *errorDetail,
*/
virNetDevIPRoutePtr def = NULL;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
char *family = NULL;
char *address = NULL, *netmask = NULL;
char *gateway = NULL;

View File

@ -717,7 +717,7 @@ virNodeDevCapDRMParseXML(xmlXPathContextPtr ctxt,
xmlNodePtr node,
virNodeDevCapDRMPtr drm)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int ret = -1, val;
char *type = NULL;
@ -746,7 +746,7 @@ virNodeDevCapCCWParseXML(xmlXPathContextPtr ctxt,
xmlNodePtr node,
virNodeDevCapCCWPtr ccw_dev)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int ret = -1;
char *cssid = NULL, *ssid = NULL, *devno = NULL;
@ -807,7 +807,7 @@ virNodeDevCapStorageParseXML(xmlXPathContextPtr ctxt,
xmlNodePtr node,
virNodeDevCapStoragePtr storage)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr *nodes = NULL;
size_t i;
int n, ret = -1;
@ -900,7 +900,7 @@ virNodeDevCapSCSIParseXML(xmlXPathContextPtr ctxt,
xmlNodePtr node,
virNodeDevCapSCSIPtr scsi)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int ret = -1;
ctxt->node = node;
@ -943,7 +943,7 @@ virNodeDevCapSCSITargetParseXML(xmlXPathContextPtr ctxt,
xmlNodePtr node,
virNodeDevCapSCSITargetPtr scsi_target)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr *nodes = NULL;
int ret = -1, n = 0;
size_t i;
@ -1019,7 +1019,7 @@ virNodeDevCapSCSIHostParseXML(xmlXPathContextPtr ctxt,
int create,
const char *virt_type)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr *nodes = NULL;
int ret = -1, n = 0;
size_t i;
@ -1119,7 +1119,7 @@ virNodeDevCapNetParseXML(xmlXPathContextPtr ctxt,
xmlNodePtr node,
virNodeDevCapNetPtr net)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr lnk;
size_t i = -1;
int ret = -1, n = -1;
@ -1197,7 +1197,7 @@ virNodeDevCapUSBInterfaceParseXML(xmlXPathContextPtr ctxt,
xmlNodePtr node,
virNodeDevCapUSBIfPtr usb_if)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int ret = -1;
ctxt->node = node;
@ -1264,7 +1264,7 @@ virNodeDevCapUSBDevParseXML(xmlXPathContextPtr ctxt,
xmlNodePtr node,
virNodeDevCapUSBDevPtr usb_dev)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int ret = -1;
ctxt->node = node;
@ -1307,7 +1307,7 @@ virNodeDevCapPCIDevIommuGroupParseXML(xmlXPathContextPtr ctxt,
xmlNodePtr iommuGroupNode,
virNodeDevCapPCIDevPtr pci_dev)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr *addrNodes = NULL;
char *numberStr = NULL;
int nAddrNodes, ret = -1;
@ -1363,7 +1363,7 @@ virPCIEDeviceInfoLinkParseXML(xmlXPathContextPtr ctxt,
xmlNodePtr linkNode,
virPCIELinkPtr lnk)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int ret = -1, speed;
char *speedStr = NULL, *portStr = NULL;
@ -1409,7 +1409,7 @@ virPCIEDeviceInfoParseXML(xmlXPathContextPtr ctxt,
xmlNodePtr pciExpressNode,
virPCIEDeviceInfoPtr pci_express)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr lnk;
int ret = -1;
@ -1579,7 +1579,7 @@ virNodeDevPCICapabilityParseXML(xmlXPathContextPtr ctxt,
virNodeDevCapPCIDevPtr pci_dev)
{
char *type = virXMLPropString(node, "type");
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int ret = -1;
ctxt->node = node;
@ -1618,7 +1618,7 @@ virNodeDevCapPCIDevParseXML(xmlXPathContextPtr ctxt,
xmlNodePtr node,
virNodeDevCapPCIDevPtr pci_dev)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr iommuGroupNode;
xmlNodePtr pciExpress;
xmlNodePtr *nodes = NULL;
@ -1733,7 +1733,7 @@ virNodeDevCapSystemParseXML(xmlXPathContextPtr ctxt,
{
virNodeDevCapSystemHardwarePtr hardware = &syscap->hardware;
virNodeDevCapSystemFirmwarePtr firmware = &syscap->firmware;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int ret = -1;
char *tmp;
@ -1774,7 +1774,7 @@ virNodeDevCapMdevAttributeParseXML(xmlXPathContextPtr ctxt,
xmlNodePtr node,
virNodeDevCapMdevPtr mdev)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
g_autoptr(virMediatedDeviceAttr) attr = virMediatedDeviceAttrNew();
ctxt->node = node;
@ -1797,7 +1797,7 @@ virNodeDevCapMdevParseXML(xmlXPathContextPtr ctxt,
xmlNodePtr node,
virNodeDevCapMdevPtr mdev)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int ret = -1;
int nattrs = 0;
g_autofree xmlNodePtr *attrs = NULL;

View File

@ -910,7 +910,7 @@ virDomainNumaDefNodeCacheParseXML(virDomainNumaPtr def,
def->mem_nodes[cur_cell].caches = g_new0(virDomainNumaCache, n);
for (i = 0; i < n; i++) {
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
virDomainNumaCachePtr cache = &def->mem_nodes[cur_cell].caches[i];
g_autofree char *tmp = NULL;
unsigned int level;
@ -1010,7 +1010,7 @@ virDomainNumaDefParseXML(virDomainNumaPtr def,
def->nmem_nodes = n;
for (i = 0; i < n; i++) {
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int rc;
unsigned int cur_cell = i;
@ -1134,7 +1134,7 @@ virDomainNumaDefParseXML(virDomainNumaPtr def,
}
VIR_FREE(tmp);
} else if (virXMLNodeNameEqual(nodes[i], "bandwidth")) {
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
type = VIR_DOMAIN_NUMA_INTERCONNECT_TYPE_BANDWIDTH;
ctxt->node = nodes[i];

View File

@ -144,7 +144,7 @@ virDomainSnapshotDiskDefParseXML(xmlNodePtr node,
char *type = NULL;
char *driver = NULL;
xmlNodePtr cur;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
ctxt->node = node;

View File

@ -178,7 +178,7 @@ virStorageAdapterParseXML(virStorageAdapterPtr adapter,
xmlXPathContextPtr ctxt)
{
int ret = -1;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
char *adapter_type = NULL;
ctxt->node = node;

View File

@ -727,7 +727,7 @@ virStorageDefParsePerms(xmlXPathContextPtr ctxt,
{
long long val;
int ret = -1;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr node;
g_autofree char *mode = NULL;

View File

@ -57,7 +57,7 @@ virSaveCookieParse(xmlXPathContextPtr ctxt,
virObjectPtr *obj,
virSaveCookieCallbacksPtr saveCookie)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int ret = -1;
*obj = NULL;

View File

@ -40,7 +40,7 @@ loadData(const char *mapfile,
void *data)
{
int ret = -1;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr *nodes = NULL;
int n;
size_t i;
@ -130,7 +130,7 @@ loadIncludes(xmlXPathContextPtr ctxt,
void *data)
{
int ret = -1;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr *nodes = NULL;
int n;
size_t i;

View File

@ -1486,7 +1486,7 @@ x86ModelParseSignatures(virCPUx86ModelPtr model,
xmlXPathContextPtr ctxt)
{
g_autofree xmlNodePtr *nodes = NULL;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
size_t i;
int n;

View File

@ -207,7 +207,7 @@ lxcDomainDefNamespaceParse(xmlXPathContextPtr ctxt,
lxcDomainDefPtr lxcDef = g_new0(lxcDomainDef, 1);
g_autofree xmlNodePtr *nodes = NULL;
bool uses_lxc_ns = false;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
int feature;
int n;
size_t i;

View File

@ -3822,7 +3822,7 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsAccelPtr caps,
char *str = NULL;
xmlNodePtr hostCPUNode;
xmlNodePtr *nodes = NULL;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
qemuMonitorCPUModelInfoPtr hostCPU = NULL;
g_autofree char *xpath = g_strdup_printf("./hostCPU[@type='%s']", typeStr);
int ret = -1;

View File

@ -186,7 +186,7 @@ qemuDomainObjPrivateXMLParseJobNBDSource(xmlNodePtr node,
virDomainDiskDefPtr disk,
virDomainXMLOptionPtr xmlopt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk);
g_autofree char *format = NULL;
g_autofree char *type = NULL;
@ -2605,7 +2605,7 @@ qemuDomainObjPrivateXMLParseBlockjobChain(xmlNodePtr node,
virDomainXMLOptionPtr xmlopt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
g_autofree char *format = NULL;
g_autofree char *type = NULL;
g_autofree char *index = NULL;
@ -2779,7 +2779,7 @@ qemuDomainObjPrivateXMLParseBlockjobData(virDomainObjPtr vm,
xmlXPathContextPtr ctxt,
virDomainXMLOptionPtr xmlopt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
virDomainDiskDefPtr disk = NULL;
g_autoptr(qemuBlockJobData) job = NULL;
g_autofree char *name = NULL;
@ -2961,7 +2961,7 @@ qemuDomainObjPrivateXMLParseSlirpFeatures(xmlNodePtr featuresNode,
xmlXPathContextPtr ctxt,
qemuSlirpPtr slirp)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
g_autofree xmlNodePtr *nodes = NULL;
size_t i;
int n;

View File

@ -1239,7 +1239,7 @@ qemuDomainObjPrivateXMLParseJob(virDomainObjPtr vm,
{
qemuDomainObjPrivatePtr priv = vm->privateData;
qemuDomainJobObjPtr job = &priv->job;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
g_autofree char *tmp = NULL;
if (!(ctxt->node = virXPathNode("./job[1]", ctxt)))

View File

@ -935,7 +935,7 @@ qemuMigrationCookieNetworkXMLParse(xmlXPathContextPtr ctxt)
int n;
xmlNodePtr *interfaces = NULL;
char *vporttype;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
if (VIR_ALLOC(optr) < 0)
goto error;
@ -983,7 +983,7 @@ qemuMigrationCookieNBDXMLParse(xmlXPathContextPtr ctxt)
size_t i;
int n;
xmlNodePtr *disks = NULL;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
if (VIR_ALLOC(ret) < 0)
goto error;
@ -1043,7 +1043,7 @@ qemuMigrationCookieStatisticsXMLParse(xmlXPathContextPtr ctxt)
{
qemuDomainJobInfoPtr jobInfo = NULL;
qemuMonitorMigrationStats *stats;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
if (!(ctxt->node = virXPathNode("./statistics", ctxt)))
return NULL;

View File

@ -143,7 +143,7 @@ static virStorageEncryptionSecretPtr
virStorageEncryptionSecretParse(xmlXPathContextPtr ctxt,
xmlNodePtr node)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
virStorageEncryptionSecretPtr ret;
char *type_str = NULL;
@ -237,7 +237,7 @@ virStorageEncryptionPtr
virStorageEncryptionParseNode(xmlNodePtr node,
xmlXPathContextPtr ctxt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
xmlNodePtr *nodes = NULL;
virStorageEncryptionPtr encdef = NULL;
virStorageEncryptionPtr ret = NULL;

View File

@ -1781,7 +1781,7 @@ virStorageAuthDefPtr
virStorageAuthDefParse(xmlNodePtr node,
xmlXPathContextPtr ctxt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
VIR_XPATH_NODE_AUTORESTORE(ctxt)
virStorageAuthDefPtr ret = NULL;
xmlNodePtr secretnode = NULL;
g_autoptr(virStorageAuthDef) authdef = NULL;