Re: [libvirt PATCH 10/10] virDomainAudioSDLParse: Use virXMLProp*

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

 



On Mon, Apr 26, 2021 at 12:48:47 +0100, Daniel P. Berrangé wrote:
> On Fri, Apr 23, 2021 at 05:39:23PM +0200, Tim Wiederhake wrote:
> > This strictens the parser to disallow negative values (interpreted as
> > `UINT_MAX + value + 1`) for attribute `bufferCount`.
> 
> I don't get what's different here - we were already using
> virStrToLong_ui to get positive values.

virStrToLong_ui accepts -1 as valid input and wraps around to the max
value. virStrToLong_uip is a version that doesn't have this weird
behaviour.

We actually document and rely on the wraparound in certain cases as
shortcuts for MAX value, thus any change from _ui to _uip equivalent
must be properly justified as not making sense/not being documented.





[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