mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
storage_conf: Break long line and polish coding style
This commit is contained in:
parent
017edaf79a
commit
73f4b30882
@ -593,19 +593,19 @@ virStoragePoolDefParseSourceString(const char *srcSpec,
|
|||||||
xmlXPathContextPtr xpath_ctxt = NULL;
|
xmlXPathContextPtr xpath_ctxt = NULL;
|
||||||
virStoragePoolSourcePtr def = NULL, ret = NULL;
|
virStoragePoolSourcePtr def = NULL, ret = NULL;
|
||||||
|
|
||||||
if (!(doc = virXMLParseStringCtxt(srcSpec, _("(storage_source_specification)"), &xpath_ctxt))) {
|
if (!(doc = virXMLParseStringCtxt(srcSpec,
|
||||||
|
_("(storage_source_specification)"),
|
||||||
|
&xpath_ctxt)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
|
||||||
|
|
||||||
if (VIR_ALLOC(def) < 0) {
|
if (VIR_ALLOC(def) < 0) {
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
node = virXPathNode("/source", xpath_ctxt);
|
if (!(node = virXPathNode("/source", xpath_ctxt))) {
|
||||||
if (!node) {
|
virStorageReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
virStorageReportError(VIR_ERR_XML_ERROR,
|
_("root element was not source"));
|
||||||
"%s", _("root element was not source"));
|
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,8 +190,7 @@ virStorageBackendFileSystemNetFindPoolSourcesFunc(virStoragePoolObjPtr pool ATTR
|
|||||||
|
|
||||||
path = groups[0];
|
path = groups[0];
|
||||||
|
|
||||||
name = strrchr(path, '/');
|
if (!(name = strrchr(path, '/'))) {
|
||||||
if (name == NULL) {
|
|
||||||
virStorageReportError(VIR_ERR_INTERNAL_ERROR,
|
virStorageReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("invalid netfs path (no /): %s"), path);
|
_("invalid netfs path (no /): %s"), path);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user