Re: [PATCH v3 4/5] util: Improve CPU frequency parsing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrea Bolognani <abologna@xxxxxxxxxx> [2017-12-14, 03:01PM +0100]:
> On Thu, 2017-12-14 at 14:55 +0100, Bjoern Walk wrote:
> > > + * Returns: 0 when the string has been parsed successfully and the CPU
> > > + *          frequency has been stored in @mhz, >0 when the string has not
> > 
> > Maybe, >0 when the line prefix does not match exactly?
> 
> Documentation goes out of sync with reality quickly enough when
> the language used is purposefully vague ;)
> 
> > > +    /* Skip the colon. If anything but a colon is found, then we're
> > > +     * not looking at the right string and we should move on */
> > > +    if (*str != ':')
> > > +        return 1;
> > > +    str++;
> > 
> > You could do *str++ != ':' and save one line.
> 
> I'd rather not. Lines are cheap :)
> 

Yeah, this was just nit-picking.

Looks like I forgot my rb, so

Reviewed-by: Bjoern Walk <bwalk@xxxxxxxxxxxxxxxxxx>

> -- 
> Andrea Bolognani / Red Hat / Virtualization
> 
> --
> libvir-list mailing list
> libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list
> 

-- 
IBM Systems
Linux on z Systems & Virtualization Development
------------------------------------------------------------------------
IBM Deutschland
Schönaicher Str. 220
71032 Böblingen
Phone: +49 7031 16 1819
E-Mail: bwalk@xxxxxxxxxx
------------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294 

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux