
On 11/07/13 11:16, Peter Krempa wrote:
Now that the function is separate clean out a few ugly places and fix up error messages. ---
Notes: Version 2: - rebased to changes in 1/3 of this series
src/conf/domain_conf.c | 119 ++++++++++++++++++++++++------------------------- 1 file changed, 59 insertions(+), 60 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 4d3812a..a1c39c2 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c
...
- when they mean to omit the source element - completely (e.g. CDROM without media). This is - just a little compatibility check to help - those broken apps */ + /* People sometimes pass a bogus '' source path when they mean to omit the + * source element completely (e.g. CDROM without media). This is just a + * little compatibility check to help those broken apps */ if (*source && STREQ(*source, "")) VIR_FREE(*source);
- *ndefhosts = nhosts; - *defhosts = hosts; - nhosts = 0; - ret = 0;
error: - VIR_FREE(protocol); - VIR_FREE(transport); - while (nhosts > 0) { + while (nhosts > 0) { virDomainDiskHostDefClear(&hosts[nhosts - 1]); nhosts--; }
Yuck; I forgot to nuke the whole error section when solving the conflict :/. Everything between the error: label and the cleanup label is now removed in my private branch. I can re-send this patch if required
+cleanup: + virDomainDiskHostDefClear(&host); + VIR_FREE(protocol); + VIR_FREE(transport); return ret; }
Sorry for the mess. PEter