Re: [PATCH 2/3] flex_arrays: allow zero length flex arrays

From: Andrew Morton
Date: Tue Apr 26 2011 - 14:58:09 EST


On Mon, 25 Apr 2011 21:45:37 -0400
Eric Paris <eparis@xxxxxxxxxx> wrote:

> Just like kmalloc will allow one to allocate a 0 length segment of memory
> flex arrays should do the same thing. It should bomb if you try to use
> something, but it should at least allow the allocation.

Well I suppose that's vaguely sensible, but it adds additional code for
no apparent benefit.

IOW: why?
--
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/