added ASSERT()

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@260 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff 2006-05-24 08:44:35 +00:00
parent a916cff8a0
commit 1dc408f891
1 changed files with 16 additions and 0 deletions

View File

@ -33,6 +33,8 @@ ReadUnaligned16 (
IN CONST UINT16 *Buffer IN CONST UINT16 *Buffer
) )
{ {
ASSERT (Buffer != NULL);
return *Buffer; return *Buffer;
} }
@ -58,6 +60,8 @@ WriteUnaligned16 (
IN UINT16 Value IN UINT16 Value
) )
{ {
ASSERT (Buffer != NULL);
return *Buffer = Value; return *Buffer = Value;
} }
@ -80,6 +84,8 @@ ReadUnaligned24 (
IN CONST UINT32 *Buffer IN CONST UINT32 *Buffer
) )
{ {
ASSERT (Buffer != NULL);
return *Buffer & 0xffffff; return *Buffer & 0xffffff;
} }
@ -105,6 +111,8 @@ WriteUnaligned24 (
IN UINT32 Value IN UINT32 Value
) )
{ {
ASSERT (Buffer != NULL);
return *Buffer = BitFieldWrite32 (*Buffer, 0, 23, Value); return *Buffer = BitFieldWrite32 (*Buffer, 0, 23, Value);
} }
@ -127,6 +135,8 @@ ReadUnaligned32 (
IN CONST UINT32 *Buffer IN CONST UINT32 *Buffer
) )
{ {
ASSERT (Buffer != NULL);
return *Buffer; return *Buffer;
} }
@ -152,6 +162,8 @@ WriteUnaligned32 (
IN UINT32 Value IN UINT32 Value
) )
{ {
ASSERT (Buffer != NULL);
return *Buffer = Value; return *Buffer = Value;
} }
@ -174,6 +186,8 @@ ReadUnaligned64 (
IN CONST UINT64 *Buffer IN CONST UINT64 *Buffer
) )
{ {
ASSERT (Buffer != NULL);
return *Buffer; return *Buffer;
} }
@ -199,5 +213,7 @@ WriteUnaligned64 (
IN UINT64 Value IN UINT64 Value
) )
{ {
ASSERT (Buffer != NULL);
return *Buffer = Value; return *Buffer = Value;
} }