summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-04-25 06:18:10 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-04-25 06:18:10 +0000
commitfd776d390d63926dad53fb8addcfdbfc76f793b0 (patch)
tree5cd00b9d520b037e81a01eb2f18a29c412a52c15
parent9f82599a514dcb57912f2da16eb05c37499da715 (diff)
downloadedk2-platforms-fd776d390d63926dad53fb8addcfdbfc76f793b0.tar.xz
Refine code to make code run more safely.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11583 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--OptionRomPkg/Application/BltLibSample/BltLibSample.c2
-rw-r--r--OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/OptionRomPkg/Application/BltLibSample/BltLibSample.c b/OptionRomPkg/Application/BltLibSample/BltLibSample.c
index 300b9ee117..29f270c3f4 100644
--- a/OptionRomPkg/Application/BltLibSample/BltLibSample.c
+++ b/OptionRomPkg/Application/BltLibSample/BltLibSample.c
@@ -40,7 +40,7 @@ Rand32 (
)
{
UINTN Found;
- UINTN Bits;
+ INTN Bits;
UINT64 Tsc1;
UINT64 Tsc2;
UINT64 TscBits;
diff --git a/OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c b/OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
index cfd5212d48..2df840af15 100644
--- a/OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
+++ b/OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
@@ -66,7 +66,7 @@ ConfigurePixelBitMaskFormat (
MergedMasks = (UINT32) (MergedMasks | Masks[3]);
ASSERT (MergedMasks != 0);
- mBltLibBytesPerPixel = (HighBitSet32 (MergedMasks) + 7) / 8;
+ mBltLibBytesPerPixel = (UINTN) ((HighBitSet32 (MergedMasks) + 7) / 8);
DEBUG ((EFI_D_INFO, "Bytes per pixel: %d\n", mBltLibBytesPerPixel));