mirror of
https://github.com/reactos/reactos.git
synced 2025-05-06 18:31:26 +00:00
[NTUSER] accelerator.c: Fix readability after commit 95657698
Add comments for default return value.
This commit is contained in:
parent
26f8b97886
commit
979551e33e
1 changed files with 10 additions and 10 deletions
|
@ -182,7 +182,7 @@ NtUserCopyAcceleratorTable(
|
||||||
Accel = UserGetAccelObject(hAccel);
|
Accel = UserGetAccelObject(hAccel);
|
||||||
if (!Accel)
|
if (!Accel)
|
||||||
{
|
{
|
||||||
goto Exit;
|
goto Exit; // Return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If Entries is NULL return table size */
|
/* If Entries is NULL return table size */
|
||||||
|
@ -240,7 +240,7 @@ NtUserCreateAcceleratorTable(
|
||||||
if (!Entries || EntriesCount <= 0)
|
if (!Entries || EntriesCount <= 0)
|
||||||
{
|
{
|
||||||
SetLastNtError(STATUS_INVALID_PARAMETER);
|
SetLastNtError(STATUS_INVALID_PARAMETER);
|
||||||
goto Exit;
|
goto Exit; // Return NULL
|
||||||
}
|
}
|
||||||
|
|
||||||
pti = PsGetCurrentThreadWin32Thread();
|
pti = PsGetCurrentThreadWin32Thread();
|
||||||
|
@ -255,7 +255,7 @@ NtUserCreateAcceleratorTable(
|
||||||
if (Accel == NULL)
|
if (Accel == NULL)
|
||||||
{
|
{
|
||||||
SetLastNtError(STATUS_NO_MEMORY);
|
SetLastNtError(STATUS_NO_MEMORY);
|
||||||
goto Exit;
|
goto Exit; // Return NULL
|
||||||
}
|
}
|
||||||
|
|
||||||
Accel->Count = EntriesCount;
|
Accel->Count = EntriesCount;
|
||||||
|
@ -265,7 +265,7 @@ NtUserCreateAcceleratorTable(
|
||||||
UserDereferenceObject(Accel);
|
UserDereferenceObject(Accel);
|
||||||
UserDeleteObject(hAccel, TYPE_ACCELTABLE);
|
UserDeleteObject(hAccel, TYPE_ACCELTABLE);
|
||||||
SetLastNtError(STATUS_NO_MEMORY);
|
SetLastNtError(STATUS_NO_MEMORY);
|
||||||
goto Exit;
|
goto Exit; // Return NULL
|
||||||
}
|
}
|
||||||
|
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
|
@ -303,7 +303,7 @@ NtUserCreateAcceleratorTable(
|
||||||
UserDereferenceObject(Accel);
|
UserDereferenceObject(Accel);
|
||||||
UserDeleteObject(hAccel, TYPE_ACCELTABLE);
|
UserDeleteObject(hAccel, TYPE_ACCELTABLE);
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
goto Exit;
|
goto Exit; // Return NULL
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: Save HandleTable in a list somewhere so we can clean it up again */
|
/* FIXME: Save HandleTable in a list somewhere so we can clean it up again */
|
||||||
|
@ -382,7 +382,7 @@ NtUserTranslateAccelerator(
|
||||||
|
|
||||||
if (hWnd == NULL)
|
if (hWnd == NULL)
|
||||||
{
|
{
|
||||||
goto Cleanup;
|
goto Cleanup; // Return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
|
@ -393,7 +393,7 @@ NtUserTranslateAccelerator(
|
||||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
SetLastNtError(_SEH2_GetExceptionCode());
|
SetLastNtError(_SEH2_GetExceptionCode());
|
||||||
_SEH2_YIELD(goto Cleanup);
|
_SEH2_YIELD(goto Cleanup); // Return 0
|
||||||
}
|
}
|
||||||
_SEH2_END;
|
_SEH2_END;
|
||||||
|
|
||||||
|
@ -402,13 +402,13 @@ NtUserTranslateAccelerator(
|
||||||
(Message.message != WM_SYSCHAR) &&
|
(Message.message != WM_SYSCHAR) &&
|
||||||
(Message.message != WM_CHAR))
|
(Message.message != WM_CHAR))
|
||||||
{
|
{
|
||||||
goto Cleanup;
|
goto Cleanup; // Return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
Accel = UserGetAccelObject(hAccel);
|
Accel = UserGetAccelObject(hAccel);
|
||||||
if (!Accel)
|
if (!Accel)
|
||||||
{
|
{
|
||||||
goto Cleanup;
|
goto Cleanup; // Return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
UserRefObjectCo(Accel, &AccelRef);
|
UserRefObjectCo(Accel, &AccelRef);
|
||||||
|
@ -416,7 +416,7 @@ NtUserTranslateAccelerator(
|
||||||
Window = UserGetWindowObject(hWnd);
|
Window = UserGetWindowObject(hWnd);
|
||||||
if (!Window)
|
if (!Window)
|
||||||
{
|
{
|
||||||
goto Cleanup;
|
goto Cleanup; // Return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
UserRefObjectCo(Window, &WindowRef);
|
UserRefObjectCo(Window, &WindowRef);
|
||||||
|
|
Loading…
Reference in a new issue