
12 Jan
2018
12 Jan
'18
2:20 p.m.
Pino Toscano <ptoscano@redhat.com> [2018-01-12, 01:37PM +0100]:
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.
You are right, of course. Expected to get a compiler warning or syntax-check error, though.
The rest of the patch seems good to me.
Thanks.
Thanks, -- Pino Toscano