[Freeciv-Dev] (PR#14387) sizeof cleanup for common/
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14387 >
> [i-freeciv-lists@xxxxxxxxxxxxx - Thu Oct 20 06:20:35 2005]:
>
> On Wed, Oct 19, 2005 at 03:08:35PM -0700, Jason Short wrote:
> >
> > <URL: http://bugs.freeciv.org/Ticket/Display.html?id=14387 >
> >
> > This patch fixes sizeof calls in common/ to not use fixed types.
>
> Maybe a macro?
>
> #define ALLOC(p) (p) = fc_malloc(sizeof(*(o)))
> #define ALLOC_ARRAY(a, n) (a) = fc_calloc(n,sizeof(**(a)))
I don't really object to the idea but I don't think it will make things
more readable.
-jason
|
|