- co_IntLoadSysMenuTemplate: only copy buffer if prior operation succeeded, bug #4803

- co_IntLoadDefaultCursors: result is not used, no need to copy it

svn path=/trunk/; revision=42822
This commit is contained in:
Gregor Schneider 2009-08-21 11:27:24 +00:00
parent f5396c2fb8
commit d93536f7a1

View file

@ -249,7 +249,7 @@ co_IntCallWindowProc(WNDPROC Proc,
HMENU APIENTRY
co_IntLoadSysMenuTemplate()
{
LRESULT Result;
LRESULT Result = 0;
NTSTATUS Status;
PVOID ResultPointer;
ULONG ResultLength;
@ -264,23 +264,20 @@ co_IntLoadSysMenuTemplate()
0,
&ResultPointer,
&ResultLength);
/* Simulate old behaviour: copy into our local buffer */
Result = *(LRESULT*)ResultPointer;
if (NT_SUCCESS(Status))
{
/* Simulate old behaviour: copy into our local buffer */
Result = *(LRESULT*)ResultPointer;
}
UserEnterCo();
if (!NT_SUCCESS(Status))
{
return(0);
}
return (HMENU)Result;
}
BOOL APIENTRY
co_IntLoadDefaultCursors(VOID)
{
LRESULT Result;
NTSTATUS Status;
PVOID ResultPointer;
ULONG ResultLength;
@ -297,9 +294,6 @@ co_IntLoadDefaultCursors(VOID)
&ResultPointer,
&ResultLength);
/* Simulate old behaviour: copy into our local buffer */
Result = *(LRESULT*)ResultPointer;
UserEnterCo();
if (!NT_SUCCESS(Status))