From: Christophe CURIS <christophe.cu...@free.fr>

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

Signed-off-by: Christophe CURIS <christophe.cu...@free.fr>
---
 util/fontconv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/fontconv.c b/util/fontconv.c
index 31dde46..8276521 100644
--- a/util/fontconv.c
+++ b/util/fontconv.c
@@ -108,7 +108,7 @@ static char *mapWeightToName(str * weight)
        if (weight->len == 0)
                return "";
 
-       for (i = 0; i < sizeof(normalNames) / sizeof(normalNames[0]); i++) {
+       for (i = 0; i < wlengthof(normalNames); i++) {
                if (strlen(normalNames[i]) == weight->len && 
strncmp(normalNames[i], weight->str, weight->len)) {
                        return "";
                }
-- 
1.8.4.rc3


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to