mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 05:22:57 +00:00
[WIN32SS:GDI] eng/error.c: Minor code tweaks (#6128)
- Remove a useless debug.h include. - Use the initialized pTeb pointer. - Remove a useless else. - Add a SAL2 annotation.
This commit is contained in:
parent
91d291f766
commit
bf7e7c2383
2 changed files with 5 additions and 11 deletions
|
@ -1,8 +1,5 @@
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
* http://msdn.microsoft.com/en-us/library/ff564940%28VS.85%29.aspx
|
* http://msdn.microsoft.com/en-us/library/ff564940%28VS.85%29.aspx
|
||||||
|
@ -12,10 +9,7 @@ APIENTRY
|
||||||
EngGetLastError(VOID)
|
EngGetLastError(VOID)
|
||||||
{
|
{
|
||||||
PTEB pTeb = NtCurrentTeb();
|
PTEB pTeb = NtCurrentTeb();
|
||||||
if (pTeb)
|
return (pTeb ? pTeb->LastErrorValue : ERROR_SUCCESS);
|
||||||
return NtCurrentTeb()->LastErrorValue;
|
|
||||||
else
|
|
||||||
return ERROR_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -34,7 +28,7 @@ EngSetLastError(_In_ ULONG iError)
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
FASTCALL
|
FASTCALL
|
||||||
SetLastNtError(NTSTATUS Status)
|
SetLastNtError(_In_ NTSTATUS Status)
|
||||||
{
|
{
|
||||||
EngSetLastError(RtlNtStatusToDosError(Status));
|
EngSetLastError(RtlNtStatusToDosError(Status));
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,9 +60,9 @@ DWORD
|
||||||
NTAPI
|
NTAPI
|
||||||
RegGetSectionDWORD(LPCWSTR pszSection, LPWSTR pszValue, DWORD dwDefault);
|
RegGetSectionDWORD(LPCWSTR pszSection, LPWSTR pszValue, DWORD dwDefault);
|
||||||
|
|
||||||
VOID FASTCALL
|
VOID
|
||||||
SetLastNtError(
|
FASTCALL
|
||||||
NTSTATUS Status);
|
SetLastNtError(_In_ NTSTATUS Status);
|
||||||
|
|
||||||
typedef struct _GDI_POOL *PGDI_POOL;
|
typedef struct _GDI_POOL *PGDI_POOL;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue