提交 62146d85 编写于 作者: M Martin Kletzander

virxml: Fix indentation

Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 f5bc8b54
...@@ -671,7 +671,7 @@ catchXMLError(void *ctx, const char *msg ATTRIBUTE_UNUSED, ...) ...@@ -671,7 +671,7 @@ catchXMLError(void *ctx, const char *msg ATTRIBUTE_UNUSED, ...)
return; return;
if (ctxt->_private) if (ctxt->_private)
domcode = ((struct virParserData *) ctxt->_private)->domcode; domcode = ((struct virParserData *) ctxt->_private)->domcode;
cur = ctxt->input->cur; cur = ctxt->input->cur;
...@@ -718,7 +718,7 @@ catchXMLError(void *ctx, const char *msg ATTRIBUTE_UNUSED, ...) ...@@ -718,7 +718,7 @@ catchXMLError(void *ctx, const char *msg ATTRIBUTE_UNUSED, ...)
contextstr, contextstr,
pointerstr); pointerstr);
} else { } else {
virGenericReportError(domcode, VIR_ERR_XML_DETAIL, virGenericReportError(domcode, VIR_ERR_XML_DETAIL,
_("at line %d: %s%s\n%s"), _("at line %d: %s%s\n%s"),
ctxt->lastError.line, ctxt->lastError.line,
ctxt->lastError.message, ctxt->lastError.message,
...@@ -928,26 +928,26 @@ char * ...@@ -928,26 +928,26 @@ char *
virXMLNodeToString(xmlDocPtr doc, virXMLNodeToString(xmlDocPtr doc,
xmlNodePtr node) xmlNodePtr node)
{ {
xmlBufferPtr xmlbuf = NULL; xmlBufferPtr xmlbuf = NULL;
char *ret = NULL; char *ret = NULL;
if (!(xmlbuf = xmlBufferCreate())) { if (!(xmlbuf = xmlBufferCreate())) {
virReportOOMError(); virReportOOMError();
return NULL; return NULL;
} }
if (xmlNodeDump(xmlbuf, doc, node, 0, 1) == 0) { if (xmlNodeDump(xmlbuf, doc, node, 0, 1) == 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("failed to convert the XML node tree")); _("failed to convert the XML node tree"));
goto cleanup; goto cleanup;
} }
ignore_value(VIR_STRDUP(ret, (const char *)xmlBufferContent(xmlbuf))); ignore_value(VIR_STRDUP(ret, (const char *)xmlBufferContent(xmlbuf)));
cleanup: cleanup:
xmlBufferFree(xmlbuf); xmlBufferFree(xmlbuf);
return ret; return ret;
} }
typedef int (*virXMLForeachCallback)(xmlNodePtr node, typedef int (*virXMLForeachCallback)(xmlNodePtr node,
...@@ -1126,7 +1126,7 @@ virXMLNodeSanitizeNamespaces(xmlNodePtr node) ...@@ -1126,7 +1126,7 @@ virXMLNodeSanitizeNamespaces(xmlNodePtr node)
xmlNodePtr dupl; xmlNodePtr dupl;
if (!node) if (!node)
return; return;
child = node->children; child = node->children;
while (child) { while (child) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册