On Wed, 2007-10-03 at 18:28 +0800, Herbert Xu wrote:
> On Wed, Oct 03, 2007 at 06:21:49PM +0800, Herbert Xu wrote:
>
> > static void __ctr_inc_byte(u8 *a, int size)
> > {
> > __be8 *b = (__be8 *)(a + size);
> > u8 c;
> >
> > do {
> > c = be8_to_cpu(*--b) + 1;
> > *b = cpu_to_be8(c);
> > if (c)
> > break;
> > } while (--size);
>
> This should be a for loop and we can make it inline too.
>
Besides being used in ctr_inc_quad(), isn't __ctr_inc_byte() also
allowing for counters that might be less than an integer or 4 bytes?
Regards,
Joy
-
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html