=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: comctl32: Avoid hardcoding array lengths.

Alexandre Julliard julliard at winehq.org
Tue Nov 22 13:06:42 CST 2011


Module: wine
Branch: master
Commit: 954e6eba7e2c4df401e3c1de4bb23216314c349c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=954e6eba7e2c4df401e3c1de4bb23216314c349c

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Mon Nov 21 19:19:46 2011 +0100

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 e51ae08..97b6a0f 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 ee4dab2..aea5224 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];
     }




More information about the wine-cvs mailing list