On Wed, Dec 03, 2014 at 02:37:25PM +0100, Max Reitz wrote: > @@ -530,8 +530,16 @@ found: > } > > /* XXX: cache several refcount block clusters ? */ > +/* In order to decrease refcounts, set @addend to the two's complement > (giving a > + * negative value and letting the implicit cast handle it is enough) and set > + * @decrease to true. @decrease must be false if the refcount should be > + * increased. */
The first time I read this patch I missed this quirk and thought that a lot of places seemed to be doing the wrong thing with addend. This is likely to cause confusion, why not make uint16_t addend truly unsigned and leave the sign to bool decrease, as suggested by the function prototype?
pgpbBldSbwQE6.pgp
Description: PGP signature