From 954e6eba7e2c4df401e3c1de4bb23216314c349c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Delanoy?= Date: Mon, 21 Nov 2011 19:19:46 +0100 Subject: [PATCH] comctl32: Avoid hardcoding array lengths. --- dlls/comctl32/ipaddress.c | 2 +- dlls/comdlg32/printdlg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c index e51ae08be7e..97b6a0f3118 100644 --- a/dlls/comctl32/ipaddress.c +++ b/dlls/comctl32/ipaddress.c @@ -339,7 +339,7 @@ static BOOL IPADDRESS_SetRange (IPADDRESS_INFO *infoPtr, int index, WORD range) static void IPADDRESS_ClearAddress (const IPADDRESS_INFO *infoPtr) { - WCHAR nil[1] = { 0 }; + static const WCHAR nil[] = { 0 }; int i; TRACE("\n"); diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c index ee4dab253d6..aea5224202d 100644 --- a/dlls/comdlg32/printdlg.c +++ b/dlls/comdlg32/printdlg.c @@ -2433,7 +2433,7 @@ static WCHAR get_decimal_sep(void) if(!sep) { - WCHAR buf[2] = {'.',0}; + WCHAR buf[] = {'.', 0}; GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, buf, sizeof(buf) / sizeof(buf[0])); sep = buf[0]; }