[libvirt] [PATCH v2 1/2] util: virsysinfo: parse frequency information on S390

Pino Toscano ptoscano at redhat.com
Fri Jan 12 12:37:11 UTC 2018


On Friday, 12 January 2018 12:38:01 CET Bjoern Walk wrote:
> +    while ((tmp_base = strstr(tmp_base, "cpu number")) &&
> +           (tmp_base = virSysinfoParseS390Line(tmp_base, "cpu number", &ncpu))) {
> +        unsigned int n;
> +        char *mhz = NULL;
> [...]
> +        if (n >= ret->nprocessor) {
> +            VIR_DEBUG("CPU number '%d' out of range", n);

Since 'n' is unsigned int, then the right printf format is %u.

The rest of the patch seems good to me.

Thanks,
-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180112/10eaa835/attachment-0001.sig>


More information about the libvir-list mailing list