Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: [FreeCiv-Cvs] rfalke: Cleanup: replace "sizeof(x)/size
Home

[Freeciv-Dev] Re: [FreeCiv-Cvs] rfalke: Cleanup: replace "sizeof(x)/size

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [FreeCiv-Cvs] rfalke: Cleanup: replace "sizeof(x)/sizeof(x[0])" wi...
From: Gaute B Strokkenes <gs234@xxxxxxxxx>
Date: Fri, 07 Sep 2001 00:37:50 +0200

On Thu, 6 Sep 2001, freeciv@xxxxxxxxxxxxxxxxxxx wrote:
> This is an automated notification of a change to freeciv cvs, 
> on Thu Sep  6 14:23:05 PDT 2001 = Thu Sep  6 21:23:05 2001 (GMT)
> by Raimar Falke <rf13@xxxxxxxxxxxxxxxxxxxxxx>
> 
> ---- Files affected:
> 
> freeciv/client options.c freeciv/client/gui-gtk menu.c repodlgs.c
> freeciv/client/gui-win32 menu.c repodlgs.c freeciv/common
> government.c hash.c improvement.c map.c shared.c shared.h tech.c
> unittype.c freeciv/server report.c rulesout.c stdinhand.c
> unittools.c
> 
> ---- Log message:
> 
> Cleanup: replace "sizeof(x)/sizeof(x[0])" with a new macro
> ARRAY_SIZE.
> 
> Patch by Paul Zastoupil <paulz@xxxxxxxxxxxx> with minor changes by
> me.

This is a very good idea, but I think the name should be ARRAY_LEN to
since the value returned is the number of elements, rather than
something you can pass to malloc().

-- 
Big Gaute                               http://www.srcf.ucam.org/~gs234/
Hmmm..  a CRIPPLED ACCOUNTANT with a FALAFEL sandwich is HIT
 by a TROLLEY-CAR..


[Prev in Thread] Current Thread [Next in Thread]