]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
storage_conf: Break long line and polish coding style
authorPeter Krempa <pkrempa@redhat.com>
Mon, 9 Jul 2012 12:08:00 +0000 (14:08 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 9 Jul 2012 14:19:50 +0000 (16:19 +0200)
src/conf/storage_conf.c
src/storage/storage_backend_fs.c

index bf4567f31190e958bfa2463ef9ca5ca0600bfec2..ab8df9eb5a2851e9a29e5edbf8a73d0c06923262 100644 (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;
     }
 
index 87d9192967aa1f8be371ba815eceb47a3ee39232..c736496ef37eb4760ba6a906dc11cb547d0ca1f3 100644 (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;