mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
util: xml: Ensure proper header style in virxml.c
Make the file use consistent header formatting and two line spacing between functions. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
5def8f7577
commit
877654b879
@ -121,6 +121,7 @@ virXPathLongBase(const char *xpath,
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virXPathInt:
|
||||
* @xpath: the XPath string to evaluate
|
||||
@ -150,6 +151,7 @@ virXPathInt(const char *xpath,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virXPathLong:
|
||||
* @xpath: the XPath string to evaluate
|
||||
@ -170,6 +172,7 @@ virXPathLong(const char *xpath,
|
||||
return virXPathLongBase(xpath, ctxt, 10, value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virXPathLongHex:
|
||||
* @xpath: the XPath string to evaluate
|
||||
@ -191,6 +194,7 @@ virXPathLongHex(const char *xpath,
|
||||
return virXPathLongBase(xpath, ctxt, 16, value);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
virXPathULongBase(const char *xpath,
|
||||
xmlXPathContextPtr ctxt,
|
||||
@ -222,6 +226,7 @@ virXPathULongBase(const char *xpath,
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virXPathUInt:
|
||||
* @xpath: the XPath string to evaluate
|
||||
@ -251,6 +256,7 @@ virXPathUInt(const char *xpath,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virXPathULong:
|
||||
* @xpath: the XPath string to evaluate
|
||||
@ -271,6 +277,7 @@ virXPathULong(const char *xpath,
|
||||
return virXPathULongBase(xpath, ctxt, 10, value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virXPathUHex:
|
||||
* @xpath: the XPath string to evaluate
|
||||
@ -292,6 +299,7 @@ virXPathULongHex(const char *xpath,
|
||||
return virXPathULongBase(xpath, ctxt, 16, value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virXPathULongLong:
|
||||
* @xpath: the XPath string to evaluate
|
||||
@ -334,6 +342,7 @@ virXPathULongLong(const char *xpath,
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virXPathLongLong:
|
||||
* @xpath: the XPath string to evaluate
|
||||
@ -482,6 +491,7 @@ virXMLNodeContentString(xmlNodePtr node)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
virXMLPropEnumInternal(xmlNodePtr node,
|
||||
const char *name,
|
||||
@ -967,6 +977,7 @@ virXPathBoolean(const char *xpath,
|
||||
return obj->boolval;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virXPathNode:
|
||||
* @xpath: the XPath string to evaluate
|
||||
@ -998,6 +1009,7 @@ virXPathNode(const char *xpath,
|
||||
return obj->nodesetval->nodeTab[0];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virXPathNodeSet:
|
||||
* @xpath: the XPath string to evaluate
|
||||
@ -1133,6 +1145,7 @@ catchXMLError(void *ctx, const char *msg G_GNUC_UNUSED, ...)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virXMLParseHelper:
|
||||
* @domcode: error domain of the caller, usually VIR_FROM_THIS
|
||||
@ -1238,7 +1251,10 @@ virXMLParseHelper(int domcode,
|
||||
return g_steal_pointer(&xml);
|
||||
}
|
||||
|
||||
const char *virXMLPickShellSafeComment(const char *str1, const char *str2)
|
||||
|
||||
const char *
|
||||
virXMLPickShellSafeComment(const char *str1,
|
||||
const char *str2)
|
||||
{
|
||||
if (str1 && !strpbrk(str1, "\r\t\n !\"#$&'()*;<>?[\\]^`{|}~") &&
|
||||
!strstr(str1, "--"))
|
||||
@ -1249,7 +1265,9 @@ const char *virXMLPickShellSafeComment(const char *str1, const char *str2)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int virXMLEmitWarning(int fd,
|
||||
|
||||
static int
|
||||
virXMLEmitWarning(int fd,
|
||||
const char *name,
|
||||
const char *cmd)
|
||||
{
|
||||
@ -1300,6 +1318,7 @@ struct virXMLRewriteFileData {
|
||||
const char *xml;
|
||||
};
|
||||
|
||||
|
||||
static int
|
||||
virXMLRewriteFile(int fd,
|
||||
const char *path,
|
||||
@ -1325,6 +1344,7 @@ virXMLRewriteFile(int fd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
virXMLSaveFile(const char *path,
|
||||
const char *warnName,
|
||||
@ -1337,6 +1357,7 @@ virXMLSaveFile(const char *path,
|
||||
virXMLRewriteFile, &data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virXMLNodeToString: convert an XML node ptr to an XML string
|
||||
*
|
||||
@ -1586,7 +1607,8 @@ virXMLNodeSanitizeNamespaces(xmlNodePtr node)
|
||||
}
|
||||
|
||||
|
||||
static void catchRNGError(void *ctx,
|
||||
static void
|
||||
catchRNGError(void *ctx,
|
||||
const char *msg,
|
||||
...)
|
||||
{
|
||||
@ -1601,7 +1623,8 @@ static void catchRNGError(void *ctx,
|
||||
}
|
||||
|
||||
|
||||
static void ignoreRNGError(void *ctx G_GNUC_UNUSED,
|
||||
static void
|
||||
ignoreRNGError(void *ctx G_GNUC_UNUSED,
|
||||
const char *msg G_GNUC_UNUSED,
|
||||
...)
|
||||
{}
|
||||
@ -1772,6 +1795,7 @@ virXMLFormatElementInternal(virBuffer *buf,
|
||||
virBufferFreeAndReset(childBuf);
|
||||
}
|
||||
|
||||
|
||||
/* same as virXMLFormatElement but outputs an empty element if @attrBuf and
|
||||
* @childBuf are both empty */
|
||||
void
|
||||
|
Loading…
x
Reference in New Issue
Block a user