diff options
Diffstat (limited to 'src/xen/xm_internal.c')
-rw-r--r-- | src/xen/xm_internal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c index 430d40b5f..7271ef00e 100644 --- a/src/xen/xm_internal.c +++ b/src/xen/xm_internal.c @@ -776,7 +776,7 @@ xenXMDomainConfigParse(virConnectPtr conn, virConfPtr conf) { def->maxvcpus = count; if (xenXMConfigGetULong(conf, "vcpu_avail", &count, -1) < 0) goto cleanup; - def->vcpus = MIN(count_one_bits(count), def->maxvcpus); + def->vcpus = MIN(count_one_bits_l(count), def->maxvcpus); if (xenXMConfigGetString(conf, "cpus", &str, NULL) < 0) goto cleanup; @@ -2337,7 +2337,7 @@ virConfPtr xenXMDomainConfigFormat(virConnectPtr conn, if (xenXMConfigSetInt(conf, "vcpus", def->maxvcpus) < 0) goto no_memory; if (def->vcpus < def->maxvcpus && - xenXMConfigSetInt(conf, "vcpu_avail", (1U << def->vcpus) - 1) < 0) + xenXMConfigSetInt(conf, "vcpu_avail", (1UL << def->vcpus) - 1) < 0) goto no_memory; if ((def->cpumask != NULL) && |