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