* src/storage_conf.c: fixes parsing to allow no sources for a pool

fix by Dan and Chris Lalancette
Daniel
This commit is contained in:
Daniel Veillard 2008-09-22 19:57:47 +00:00
parent 0958489ca5
commit 4f84e631ed
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Mon Sep 22 21:55:55 CEST 2008 Daniel Veillard <veillard@redhat.com>
* src/storage_conf.c: fixes parsing to allow no sources for a pool
fix by Dan and Chris Lalancette
Mon Sep 22 18:00:39 CEST 2008 Daniel Veillard <veillard@redhat.com>
* src/remote_internal.c src/storage_driver.c: structure init fixes

View File

@ -295,7 +295,7 @@ virStoragePoolDefParseDoc(virConnectPtr conn,
xmlNodePtr *nodeset = NULL;
int nsource, i;
if ((nsource = virXPathNodeSet(conn, "/pool/source/device", ctxt, &nodeset)) <= 0) {
if ((nsource = virXPathNodeSet(conn, "/pool/source/device", ctxt, &nodeset)) < 0) {
virStorageReportError(conn, VIR_ERR_XML_ERROR,
"%s", _("cannot extract storage pool source devices"));
goto cleanup;