Author: tkreuzer
Date: Sat Aug 8 21:53:21 2009
New Revision: 42535
URL:
http://svn.reactos.org/svn/reactos?rev=42535&view=rev
Log:
[FORMATTING]
4 spaces indentation, no code change
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/display.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/display.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/display.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/display.c [iso-8859-1] Sat Aug 8
21:53:21 2009
@@ -130,70 +130,70 @@
/* Check arguments */
#ifdef CDS_VIDEOPARAMETERS
+ if (dwflags != CDS_VIDEOPARAMETERS && lParam != NULL)
+#else
+ if (lParam != NULL)
+#endif
+ {
+ SetLastWin32Error(ERROR_INVALID_PARAMETER);
+ return DISP_CHANGE_BADPARAM;
+ }
- if (dwflags != CDS_VIDEOPARAMETERS && lParam != NULL)
-#else
+ if (hwnd != NULL)
+ {
+ SetLastWin32Error(ERROR_INVALID_PARAMETER);
+ return DISP_CHANGE_BADPARAM;
+ }
- if (lParam != NULL)
-#endif
+ /* Copy devmode */
+ if (lpDevMode != NULL)
+ {
+ _SEH2_TRY
+ {
+ ProbeForRead(lpDevMode, sizeof(DevMode.dmSize), 1);
+ DevMode.dmSize = lpDevMode->dmSize;
+ DevMode.dmSize = min(sizeof(DevMode), DevMode.dmSize);
+ ProbeForRead(lpDevMode, DevMode.dmSize, 1);
+ RtlCopyMemory(&DevMode, lpDevMode, DevMode.dmSize);
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = _SEH2_GetExceptionCode();
+ }
+ _SEH2_END
- {
- SetLastWin32Error(ERROR_INVALID_PARAMETER);
- return DISP_CHANGE_BADPARAM;
- }
- if (hwnd != NULL)
- {
- SetLastWin32Error(ERROR_INVALID_PARAMETER);
- return DISP_CHANGE_BADPARAM;
- }
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastNtError(Status);
+ return DISP_CHANGE_BADPARAM;
+ }
- /* Copy devmode */
- if (lpDevMode != NULL)
- {
- _SEH2_TRY
- {
- ProbeForRead(lpDevMode, sizeof(DevMode.dmSize), 1);
- DevMode.dmSize = lpDevMode->dmSize;
- DevMode.dmSize = min(sizeof(DevMode), DevMode.dmSize);
- ProbeForRead(lpDevMode, DevMode.dmSize, 1);
- RtlCopyMemory(&DevMode, lpDevMode, DevMode.dmSize);
- }
- _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
- {
- Status = _SEH2_GetExceptionCode();
- }
- _SEH2_END
- if (!NT_SUCCESS(Status))
- {
- SetLastNtError(Status);
- return DISP_CHANGE_BADPARAM;
- }
- if (DevMode.dmDriverExtra > 0)
- {
- DPRINT1("lpDevMode->dmDriverExtra is IGNORED!\n");
- DevMode.dmDriverExtra = 0;
- }
- lpSafeDevMode = &DevMode;
- }
+ if (DevMode.dmDriverExtra > 0)
+ {
+ DPRINT1("lpDevMode->dmDriverExtra is IGNORED!\n");
+ DevMode.dmDriverExtra = 0;
+ }
+ lpSafeDevMode = &DevMode;
+ }
- /* Copy the device name */
- if (lpszDeviceName != NULL)
- {
- Status = IntSafeCopyUnicodeString(&SafeDeviceName, lpszDeviceName);
- if (!NT_SUCCESS(Status))
- {
- SetLastNtError(Status);
- return DISP_CHANGE_BADPARAM;
- }
- pSafeDeviceName = &SafeDeviceName;
- }
+ /* Copy the device name */
+ if (lpszDeviceName != NULL)
+ {
+ Status = IntSafeCopyUnicodeString(&SafeDeviceName, lpszDeviceName);
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastNtError(Status);
+ return DISP_CHANGE_BADPARAM;
+ }
+ pSafeDeviceName = &SafeDeviceName;
+ }
- /* Call internal function */
- Ret = IntChangeDisplaySettings(pSafeDeviceName, lpSafeDevMode, dwflags, lParam);
+ /* Call internal function */
+ Ret = IntChangeDisplaySettings(pSafeDeviceName, lpSafeDevMode, dwflags, lParam);
- if (pSafeDeviceName != NULL)
- RtlFreeUnicodeString(pSafeDeviceName);
+ if (pSafeDeviceName != NULL)
+ RtlFreeUnicodeString(pSafeDeviceName);
- return Ret;
+ return Ret;
}