mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
ch: Use uint for @maxvcpus in virCHDomainRefreshThreadInfo()
The @maxvcpus variable inside of virCHDomainRefreshThreadInfo() holds retval of virDomainDefGetVcpusMax() which returns an unsigned int. Also, the variable is then passed to VIR_WARN() with incorrect format directive (%ld). Switch variable to uint and fix the format directive. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
a3397370e8
commit
e96db2ae01
@ -225,7 +225,7 @@ chValidateDomainDeviceDef(const virDomainDeviceDef *dev,
|
|||||||
int
|
int
|
||||||
virCHDomainRefreshThreadInfo(virDomainObj *vm)
|
virCHDomainRefreshThreadInfo(virDomainObj *vm)
|
||||||
{
|
{
|
||||||
size_t maxvcpus = virDomainDefGetVcpusMax(vm->def);
|
unsigned int maxvcpus = virDomainDefGetVcpusMax(vm->def);
|
||||||
virCHMonitorThreadInfo *info = NULL;
|
virCHMonitorThreadInfo *info = NULL;
|
||||||
size_t nthreads;
|
size_t nthreads;
|
||||||
size_t ncpus = 0;
|
size_t ncpus = 0;
|
||||||
@ -252,7 +252,7 @@ virCHDomainRefreshThreadInfo(virDomainObj *vm)
|
|||||||
|
|
||||||
/* TODO: Remove the warning when hotplug is implemented.*/
|
/* TODO: Remove the warning when hotplug is implemented.*/
|
||||||
if (ncpus != maxvcpus)
|
if (ncpus != maxvcpus)
|
||||||
VIR_WARN("Mismatch in the number of cpus, expected: %ld, actual: %ld",
|
VIR_WARN("Mismatch in the number of cpus, expected: %u, actual: %zu",
|
||||||
maxvcpus, ncpus);
|
maxvcpus, ncpus);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user