storage_conf: Break long line and polish coding style

This commit is contained in:
Peter Krempa 2012-07-09 14:08:00 +02:00
parent 017edaf79a
commit 73f4b30882
2 changed files with 7 additions and 8 deletions

View File

@ -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;
}

View File

@ -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;