[PATCH] Uninstaller: Change hardcoded value for maximum subkey name length to a const.

Dan Hipschman dsh at linux.ucla.edu
Tue May 8 13:03:20 CDT 2007


On Tue, May 08, 2007 at 11:19:16AM -0500, Tom Spear wrote:
> static const DWORD MAXSUBKEYNAMELEN = 255;
> WCHAR subKeyName[MAXSUBKEYNAMELEN + 1];

I'm not sure what version of C wine is strictly trying to conform to,
but it's usually best to go with the lowest common denominator.  This is
not C89.  The const keyword doesn't actually make the variable constant
(I know it's not the greatest feature of C).  The array size won't be
evaluated until runtime, so technically this is a variable length array
which weren't added until C99.  You can make it C89 simply by using
#define instead of declaring it as a variable.




More information about the wine-devel mailing list