On 9/26/23 15:56, Martin Kletzander wrote:
> The function returns how many array items were filled in, but virsh
> never checked for anything other than errors.  Just to make sure this
> does not report invalid data, even though the only possibility would be
> reporting 0 free pages, check the returned data so that possible errors
> are detected.
> 
> Signed-off-by: Martin Kletzander <mklet...@redhat.com>
> ---
>  tools/virsh-host.c | 28 ++++++++++++++++++++++------
>  1 file changed, 22 insertions(+), 6 deletions(-)

Yeah. This should never happen though (at least in real life
conditions), because our virHostMemGetFreePages() either fills
everything or returns an error. But the way our public API is documented
warrants having this in.

Reviewed-by: Michal Privoznik <mpriv...@redhat.com>

Michal

Reply via email to