Author: tfaber
Date: Wed Dec 21 21:49:22 2011
New Revision: 54734
URL:
http://svn.reactos.org/svn/reactos?rev=54734&view=rev
Log:
[EXPLORER][ADVAPI32][SETUPAPI][SYSSETUP]
- Fix some issues found by cppcheck. Patch by Vincenzo Cotugno
Modified:
trunk/reactos/base/shell/explorer/shell/mainframe.cpp
trunk/reactos/dll/win32/advapi32/reg/reg.c
trunk/reactos/dll/win32/setupapi/devclass.c
trunk/reactos/dll/win32/syssetup/wizard.c
Modified: trunk/reactos/base/shell/explorer/shell/mainframe.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/shell/…
==============================================================================
--- trunk/reactos/base/shell/explorer/shell/mainframe.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/shell/mainframe.cpp [iso-8859-1] Wed Dec 21 21:49:22
2011
@@ -234,7 +234,7 @@
CheckMenuItem(_menu_info._hMenuView, ID_VIEW_STATUSBAR, MF_BYCOMMAND|MF_CHECKED);
_hsidebar = CreateWindowEx(WS_EX_STATICEDGE, WC_TREEVIEW, TEXT("Sidebar"),
- WS_CHILD|WS_TABSTOP|WS_BORDER|/*WS_VISIBLE|*/WS_CHILD|TVS_HASLINES|TVS_HASBUTTONS|TVS_SHOWSELALWAYS|TVS_INFOTIP,
+ WS_CHILD|WS_TABSTOP|WS_BORDER|/*WS_VISIBLE|*/TVS_HASLINES|TVS_HASBUTTONS|TVS_SHOWSELALWAYS|TVS_INFOTIP,
-1, -1, 200, 0, _hwnd, (HMENU)IDW_SIDEBAR, g_Globals._hInstance, 0);
_himl_old = TreeView_SetImageList(_hsidebar, _himl, TVSIL_NORMAL);
Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] Wed Dec 21 21:49:22 2011
@@ -4029,8 +4029,8 @@
RtlInitAnsiString( &nameA, name );
if ((status = RtlAnsiStringToUnicodeString( &nameW, &nameA, TRUE )))
{
+ ClosePredefKey(hkey);
return RtlNtStatusToDosError(status);
- ClosePredefKey(hkey);
}
status = NtQueryValueKey( hkey, &nameW, KeyValuePartialInformation,
Modified: trunk/reactos/dll/win32/setupapi/devclass.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/devclas…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/devclass.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/devclass.c [iso-8859-1] Wed Dec 21 21:49:22 2011
@@ -1195,8 +1195,6 @@
SetLastError(ERROR_INVALID_USER_BUFFER);
else if (!DeviceInfoData && IsEqualIID(&list->ClassGuid,
&GUID_NULL))
SetLastError(ERROR_INVALID_PARAMETER);
- else if (!PropertySheetHeader)
- SetLastError(ERROR_INVALID_PARAMETER);
else if (PropertySheetType != DIGCDP_FLAG_ADVANCED
&& PropertySheetType != DIGCDP_FLAG_BASIC
&& PropertySheetType != DIGCDP_FLAG_REMOTE_ADVANCED
Modified: trunk/reactos/dll/win32/syssetup/wizard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/wizard.…
==============================================================================
--- trunk/reactos/dll/win32/syssetup/wizard.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/syssetup/wizard.c [iso-8859-1] Wed Dec 21 21:49:22 2011
@@ -743,7 +743,6 @@
MessageBoxW(hwndDlg, WrongPassword, Title, MB_ICONERROR |
MB_OK);
SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, -1);
return TRUE;
- break;
}
Password++;
}