WINGs: Use the macro 'wlengthof' to get the number of element in an array

The new macro 'wlengthof' from WUtil makes code easier to read than the
previous [sizeof() / sizeof([0]) ] construct.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS authored and Carlos R. Mafra committed 2013-12-30 18:11:03 +00:00
1 parent fd47650717
commit a3b6b62049
4 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -596,7 +596,7 @@ static void menu_parser_condition_ifmacro(WMenuParser parser, Bool check_exists)
parser->rd++;
/* Add this condition to the stack of conditions */
if (parser->cond.depth >= sizeof(parser->cond.stack) / sizeof(parser->cond.stack[0])) {
if (parser->cond.depth >= wlengthof(parser->cond.stack)) {
WMenuParserError(parser, _("too many nested #if sequences") );
return;
}