just a little thing in dlls/winmm/lolvldrv.c

Bill Medland billmedland at mercuryspeed.com
Fri Nov 12 17:37:39 CST 2004

On November 12, 2004 12:17 pm, Rémi Assailly wrote:
> Changelog:
> * just replace all (sizeof(MM_MLDrvs) / sizeof(MM_MLDrvs[0]) by
> MAX_MM_MLDRVS to be more readable. ( I think it is )

I think it isn't.

(sizeof(a)/sizeof(a[0]) or (sizeof(a)/sizeof(*a)) is a standard statement that 
means "the number of elements in a".  Some people make a macro such as 
COUNTOF(a) to make it more readable but the expanded version is quite 

The altered version is less readable because one then has to go back to the 
definition of MAX_MM_MLDRVS and its uses to see that indeed it is (or at 
least is supposed to be) the number of elements in the array that the 
statements are protecting.

Bill Medland
mailto:billmedland at mercuryspeed.com

More information about the wine-devel mailing list