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

View File

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