Re: [libvirt] [PATCH 1/2] qemu: Invert condition nesting in qemuDomainDefValidate()

2017-12-15 Thread Andrea Bolognani
On Fri, 2017-12-15 at 14:20 +0100, Peter Krempa wrote: > > > You know that generally we prefer variables declared at the top scope? > > > > Is that so? I've seen several instances of the opposite, and it > > makes to me not to pollute the function scope with one-use > > variables when there are us

Re: [libvirt] [PATCH 1/2] qemu: Invert condition nesting in qemuDomainDefValidate()

2017-12-15 Thread Peter Krempa
On Fri, Dec 15, 2017 at 14:11:41 +0100, Andrea Bolognani wrote: > On Fri, 2017-12-15 at 13:18 +0100, Peter Krempa wrote: > > On Thu, Dec 14, 2017 at 17:29:50 +0100, Andrea Bolognani wrote: > > > While at the moment we're only performing a single check that is > > > connected to vCPU hotplugging, we

Re: [libvirt] [PATCH 1/2] qemu: Invert condition nesting in qemuDomainDefValidate()

2017-12-15 Thread Andrea Bolognani
On Fri, 2017-12-15 at 13:18 +0100, Peter Krempa wrote: > On Thu, Dec 14, 2017 at 17:29:50 +0100, Andrea Bolognani wrote: > > While at the moment we're only performing a single check that is > > connected to vCPU hotplugging, we're going to introduce a second > > one soon. Move the topology check un

Re: [libvirt] [PATCH 1/2] qemu: Invert condition nesting in qemuDomainDefValidate()

2017-12-15 Thread Peter Krempa
On Thu, Dec 14, 2017 at 17:29:50 +0100, Andrea Bolognani wrote: > While at the moment we're only performing a single check that is > connected to vCPU hotplugging, we're going to introduce a second > one soon. Move the topology check underneath the capability check > to make that easier; as a bonus

[libvirt] [PATCH 1/2] qemu: Invert condition nesting in qemuDomainDefValidate()

2017-12-14 Thread Andrea Bolognani
While at the moment we're only performing a single check that is connected to vCPU hotplugging, we're going to introduce a second one soon. Move the topology check underneath the capability check to make that easier; as a bonus, doing so allows us to reduce the scope of the 'topologycpus' variable.