[pulseaudio-discuss] Multiple PulseAudio bugs affecting mplayer2 users

David Henningsson david.henningsson at canonical.com
Mon Aug 6 02:29:12 PDT 2012


Just a thing I spotted while reading it through quickly:

 > +static void subtract_helper(size_t *p, size_t amount)
 > +{
 > +    if (*p == (size_t) -1)
 > +        return;
 > +    if (*p < amount)
 > +        *p = 0;
 > +    *p -= amount;
 > +}

Maybe you meant:

if (*p < amount)
     *p = 0;
else
     *p -= amount;

Otherwise *p might end up being "-amount" instead of "0"?



-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic


More information about the pulseaudio-discuss mailing list