Re: [RFC, 2.6] a simple FIFO implementation

From: Stelian Pop
Date: Thu Sep 16 2004 - 10:34:23 EST


On Thu, Sep 16, 2004 at 05:09:51PM +0200, Buddy Lucas wrote:

> > + total = remaining = min(len, fifo->size - fifo->tail + fifo->head);
>
> I could be mistaken (long day at the office ;-) but doesn't this fail after
> wrapping?

No, because the type is *unsigned* int.

Stelian.
--
Stelian Pop <stelian@xxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/