mirror of https://gitee.com/openkylin/libvirt.git
ch: Use int for @niothreads in virCHMonitorGetIOThreads()
The @niothreads inside of virCHMonitorGetIOThreads() is declared as of size_t type. This would work, except the variable is then passed to VIR_DEBUG with incorrect format directive (%ld) and returned. But the function returns an int not size_t. Fix the variable declaration and format directive. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
e96db2ae01
commit
cf05b7fd97
|
@ -937,7 +937,7 @@ virCHMonitorGetIOThreads(virCHMonitor *mon,
|
||||||
virDomainIOThreadInfo ***iothreads)
|
virDomainIOThreadInfo ***iothreads)
|
||||||
{
|
{
|
||||||
size_t nthreads = 0;
|
size_t nthreads = 0;
|
||||||
size_t niothreads = 0;
|
int niothreads = 0;
|
||||||
int thd_index;
|
int thd_index;
|
||||||
virDomainIOThreadInfo **iothreadinfolist = NULL;
|
virDomainIOThreadInfo **iothreadinfolist = NULL;
|
||||||
virDomainIOThreadInfo *iothreadinfo = NULL;
|
virDomainIOThreadInfo *iothreadinfo = NULL;
|
||||||
|
@ -969,7 +969,7 @@ virCHMonitorGetIOThreads(virCHMonitor *mon,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VIR_DEBUG("niothreads = %ld", niothreads);
|
VIR_DEBUG("niothreads = %d", niothreads);
|
||||||
*iothreads = g_steal_pointer(&iothreadinfolist);
|
*iothreads = g_steal_pointer(&iothreadinfolist);
|
||||||
return niothreads;
|
return niothreads;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue