From 1dc408f8910b1ddca89cff2ebdbf8e712df583d8 Mon Sep 17 00:00:00 2001 From: vanjeff Date: Wed, 24 May 2006 08:44:35 +0000 Subject: [PATCH] added ASSERT() git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@260 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Library/BaseLib/Unaligned.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/MdePkg/Library/BaseLib/Unaligned.c b/MdePkg/Library/BaseLib/Unaligned.c index 9d0521e595..a54a99e7e6 100644 --- a/MdePkg/Library/BaseLib/Unaligned.c +++ b/MdePkg/Library/BaseLib/Unaligned.c @@ -33,6 +33,8 @@ ReadUnaligned16 ( IN CONST UINT16 *Buffer ) { + ASSERT (Buffer != NULL); + return *Buffer; } @@ -58,6 +60,8 @@ WriteUnaligned16 ( IN UINT16 Value ) { + ASSERT (Buffer != NULL); + return *Buffer = Value; } @@ -80,6 +84,8 @@ ReadUnaligned24 ( IN CONST UINT32 *Buffer ) { + ASSERT (Buffer != NULL); + return *Buffer & 0xffffff; } @@ -105,6 +111,8 @@ WriteUnaligned24 ( IN UINT32 Value ) { + ASSERT (Buffer != NULL); + return *Buffer = BitFieldWrite32 (*Buffer, 0, 23, Value); } @@ -127,6 +135,8 @@ ReadUnaligned32 ( IN CONST UINT32 *Buffer ) { + ASSERT (Buffer != NULL); + return *Buffer; } @@ -152,6 +162,8 @@ WriteUnaligned32 ( IN UINT32 Value ) { + ASSERT (Buffer != NULL); + return *Buffer = Value; } @@ -174,6 +186,8 @@ ReadUnaligned64 ( IN CONST UINT64 *Buffer ) { + ASSERT (Buffer != NULL); + return *Buffer; } @@ -199,5 +213,7 @@ WriteUnaligned64 ( IN UINT64 Value ) { + ASSERT (Buffer != NULL); + return *Buffer = Value; }