Simon Josefsson wrote:
> Perhaps for clarity we could change it into:
>
> #define CEIL_DIV(a,b) (((a) - 1) / (b)) + 1
> l = CEIL_DIV (dkLen, hLen);
>
> What do you think?
People could be tempted to borrow this formula and apply to situations where
it doesn't fit.
Normally one uses
#define CEIL(a,b) (((a) + (b) - 1) / (b))
but not here, because here
- this formula could yield overflow,
- it is known that dkLen > 0.
> Neither of the first two approaches is really trivial to understand
> what they mean
The comment already explains it:
l = CEIL (dkLen / hLen) ,
But you are free to add more comments, of course.
Bruno
_______________________________________________
bug-gnulib mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnulib