kernel32: avoid shadowing a parameter

Austin English austinenglish at gmail.com
Wed Mar 9 03:11:54 CST 2011


-- 
-Austin
-------------- next part --------------
diff --git a/dlls/kernel32/profile.c b/dlls/kernel32/profile.c
index 26c6736..f1dc453 100644
--- a/dlls/kernel32/profile.c
+++ b/dlls/kernel32/profile.c
@@ -1114,11 +1114,11 @@ INT WINAPI GetPrivateProfileStringW( LPCWSTR section, LPCWSTR entry,
 
         if (p >= def_val)
         {
-            int len = (int)(p - def_val) + 1;
+            int len_p = (int)(p - def_val) + 1;
 
-            defval_tmp = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR));
-            memcpy(defval_tmp, def_val, len * sizeof(WCHAR));
-            defval_tmp[len] = '\0';
+            defval_tmp = HeapAlloc(GetProcessHeap(), 0, (len_p + 1) * sizeof(WCHAR));
+            memcpy(defval_tmp, def_val, len_p * sizeof(WCHAR));
+            defval_tmp[len_p] = '\0';
             def_val = defval_tmp;
         }
     }


More information about the wine-patches mailing list