aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2008-06-03 08:01:45 +0000
committerRichard W.M. Jones <rjones@redhat.com>2008-06-03 08:01:45 +0000
commiteeb224b812bab6502db2e9ea31fd2b0f152ec7b1 (patch)
tree53a11d0f4d7df4c4fa2217d756620162971e9be8
parentGeneral tips for contributing patches (diff)
downloadlibvirt-eeb224b812bab6502db2e9ea31fd2b0f152ec7b1.tar.gz
libvirt-eeb224b812bab6502db2e9ea31fd2b0f152ec7b1.tar.bz2
libvirt-eeb224b812bab6502db2e9ea31fd2b0f152ec7b1.zip
* src/xm_internal.c: If vcpu cpuset attribute is invalid
then display an error instead of silently ignoring it (Hiroyuki Kaguchi).
-rw-r--r--ChangeLog6
-rw-r--r--src/xm_internal.c19
2 files changed, 13 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 6ccfe02e9..491bc5696 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Jun 3 08:58:00 BST 2008 Richard W.M. Jones <rjones@redhat.com>
+
+ * src/xm_internal.c: If vcpu cpuset attribute is invalid
+ then display an error instead of silently ignoring it
+ (Hiroyuki Kaguchi).
+
Mon Jun 2 12:52:00 BST 2008 Richard W.M. Jones <rjones@redhat.com>
General tips for contributing patches
diff --git a/src/xm_internal.c b/src/xm_internal.c
index 4c64b7dcc..bee178052 100644
--- a/src/xm_internal.c
+++ b/src/xm_internal.c
@@ -2004,20 +2004,15 @@ virConfPtr xenXMParseXMLToConfig(virConnectPtr conn, const char *xml) {
char *ranges;
ranges = virConvertCpuSet(conn, cpus, 0);
- if (ranges != NULL) {
- VIR_FREE(cpus);
- if (xenXMConfigSetString(conf, "cpus", ranges) < 0) {
- VIR_FREE(ranges);
- goto error;
- }
+ VIR_FREE(cpus);
+ if (ranges == NULL) {
+ goto error;
+ }
+ if (xenXMConfigSetString(conf, "cpus", ranges) < 0) {
VIR_FREE(ranges);
- } else {
- if (xenXMConfigSetString(conf, "cpus", cpus) < 0) {
- VIR_FREE(cpus);
- goto error;
- }
- VIR_FREE(cpus);
+ goto error;
}
+ VIR_FREE(ranges);
}
obj = xmlXPathEval(BAD_CAST "string(/domain/os/type)", ctxt);