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;
|
||||
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;
|
||||
}
|
||||
|
||||
if (VIR_ALLOC(def) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
node = virXPathNode("/source", xpath_ctxt);
|
||||
if (!node) {
|
||||
virStorageReportError(VIR_ERR_XML_ERROR,
|
||||
"%s", _("root element was not source"));
|
||||
if (!(node = virXPathNode("/source", xpath_ctxt))) {
|
||||
virStorageReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("root element was not source"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
@ -190,8 +190,7 @@ virStorageBackendFileSystemNetFindPoolSourcesFunc(virStoragePoolObjPtr pool ATTR
|
||||
|
||||
path = groups[0];
|
||||
|
||||
name = strrchr(path, '/');
|
||||
if (name == NULL) {
|
||||
if (!(name = strrchr(path, '/'))) {
|
||||
virStorageReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("invalid netfs path (no /): %s"), path);
|
||||
goto cleanup;
|
||||
|
Loading…
x
Reference in New Issue
Block a user