
On Mon, Nov 23, 2015 at 10:35:34 -0500, John Ferlan wrote:
On 11/20/2015 10:22 AM, Peter Krempa wrote:
--- src/conf/domain_conf.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d8c1068..3062b3a 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1461,6 +1461,13 @@ int virDomainDefSetVCpus(virDomainDefPtr def, unsigned int vcpus) { + if (vcpus > def->maxvcpus) {
Use accessor (virDomainDefGetVCpusMax)
These are actually accessors to the vcpu related values, so using it here is rather counterproductive. As you've probably noticed later once def->vcpus becomes an array of structs, def->maxvcpus is the count tracking element here, so this function really is a accessor to this whole infrastructure, so I'll not change it. Peter