Author: sserapion
Date: Sat Oct 31 00:51:29 2009
New Revision: 43860

URL: http://svn.reactos.org/svn/reactos?rev=43860&view=rev
Log:
Please don't cast NULL to an integer type. Fixes building this module.

Modified:
    branches/ros-amd64-bringup/reactos/dll/win32/powrprof/powrprof.c

Modified: branches/ros-amd64-bringup/reactos/dll/win32/powrprof/powrprof.c
URL: 
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/win32/powrprof/powrprof.c?rev=43860&r1=43859&r2=43860&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/powrprof/powrprof.c 
[iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/powrprof/powrprof.c 
[iso-8859-1] Sat Oct 31 00:51:29 2009
@@ -688,13 +688,13 @@
 
     if (ReadPwrScheme(uiID,&tmp))
     {
-        if 
(RegOpenKeyEx(HKEY_CURRENT_USER,szUserPowerConfigSubKey,(DWORD)NULL,KEY_ALL_ACCESS,&hKey)
 != ERROR_SUCCESS)
+        if 
(RegOpenKeyEx(HKEY_CURRENT_USER,szUserPowerConfigSubKey,0,KEY_ALL_ACCESS,&hKey) 
!= ERROR_SUCCESS)
         {
             return FALSE;
         }
         swprintf(Buf,L"%i",uiID);
 
-        if 
(RegSetValueExW(hKey,szCurrentPowerPolicies,(DWORD)NULL,REG_SZ,(CONST BYTE 
*)Buf,strlenW(Buf)*sizeof(WCHAR)) == ERROR_SUCCESS)
+        if (RegSetValueExW(hKey,szCurrentPowerPolicies,0,REG_SZ,(CONST BYTE 
*)Buf,strlenW(Buf)*sizeof(WCHAR)) == ERROR_SUCCESS)
         {
             RegCloseKey(hKey);
             if ((lpGlobalPowerPolicy != NULL) || (lpPowerPolicy != NULL))
@@ -799,7 +799,7 @@
 
     if (RegCreateKey(HKEY_LOCAL_MACHINE,Buf, &hKey) == ERROR_SUCCESS)
     {
-        RegSetValueExW(hKey,szPolicies,(DWORD)NULL,REG_BINARY,(const unsigned 
char *)pMachineProcessorPowerPolicy,sizeof(MACHINE_PROCESSOR_POWER_POLICY));
+        RegSetValueExW(hKey,szPolicies,0,REG_BINARY,(const unsigned char 
*)pMachineProcessorPowerPolicy,sizeof(MACHINE_PROCESSOR_POWER_POLICY));
         RegCloseKey(hKey);
         return TRUE;
     }
@@ -821,7 +821,7 @@
                     &hKey) != ERROR_SUCCESS)
         return;
     swprintf(Buf,L"%i",g_LastID);
-    RegSetValueExW(hKey,szLastID,(DWORD)NULL,REG_SZ,(CONST BYTE 
*)Buf,strlenW(Buf)*sizeof(WCHAR));
+    RegSetValueExW(hKey,szLastID,0,REG_SZ,(CONST BYTE 
*)Buf,strlenW(Buf)*sizeof(WCHAR));
     RegCloseKey(hKey);
 }
 
@@ -845,8 +845,8 @@
 
     if (RegCreateKey(HKEY_CURRENT_USER,Buf,&hKey) == ERROR_SUCCESS)
     {
-        RegSetValueExW(hKey,szName,(DWORD)NULL,REG_SZ,(const unsigned char 
*)lpszName,strlenW((const char *)lpszName)*sizeof(WCHAR));
-        RegSetValueExW(hKey,szDescription,(DWORD)NULL,REG_SZ,(const unsigned 
char *)lpszDescription,strlenW((const char *)lpszDescription)*sizeof(WCHAR));
+        RegSetValueExW(hKey,szName,0,REG_SZ,(const unsigned char 
*)lpszName,strlenW((const char *)lpszName)*sizeof(WCHAR));
+        RegSetValueExW(hKey,szDescription,0,REG_SZ,(const unsigned char 
*)lpszDescription,strlenW((const char *)lpszDescription)*sizeof(WCHAR));
         RegCloseKey(hKey);
         return WritePwrPolicy(puiID,pPowerPolicy);
     }
@@ -1143,13 +1143,13 @@
 
     if (RegCreateKey(HKEY_CURRENT_USER,Buf,&hKey) == ERROR_SUCCESS)
     {
-        RegSetValueExW(hKey,szPolicies,(DWORD)NULL,REG_BINARY,(const unsigned 
char *)&pPowerPolicy->user,sizeof(USER_POWER_POLICY));
+        RegSetValueExW(hKey,szPolicies,0,REG_BINARY,(const unsigned char 
*)&pPowerPolicy->user,sizeof(USER_POWER_POLICY));
         RegCloseKey(hKey);
         swprintf(Buf,L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Controls 
Folder\\PowerCfg\\PowerPolicies\\%i",*puiID);
 
         if (RegCreateKey(HKEY_LOCAL_MACHINE,Buf,&hKey) == ERROR_SUCCESS)
         {
-            RegSetValueExW(hKey,szPolicies,(DWORD)NULL,REG_BINARY,(const 
unsigned char *)&pPowerPolicy->mach,sizeof(MACHINE_POWER_POLICY));
+            RegSetValueExW(hKey,szPolicies,0,REG_BINARY,(const unsigned char 
*)&pPowerPolicy->mach,sizeof(MACHINE_POWER_POLICY));
             RegCloseKey(hKey);
             return TRUE;
         }


Reply via email to