summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-08-19 13:45:38 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-08-19 13:45:38 +0000
commit792a1534671f5e326a5add71eef4c6a7bd3a019c (patch)
tree2257fb76d9189a2afb104377fce73aed3fd0ec5e
parent09e156131de5b788dc64d965260a99d4b6dd2b7f (diff)
downloadedk2-platforms-792a1534671f5e326a5add71eef4c6a7bd3a019c.tar.xz
Do not use WriteUnaligned64() in BaseLib since StartingOffset and EndingOffset field in MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH structure has been correctly to ensure of natural alignment.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9140 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c b/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c
index bf64cdad1f..73ec7a7f4a 100644
--- a/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c
+++ b/MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c
@@ -2589,8 +2589,6 @@ DevPathFromTextRelativeOffsetRange (
CHAR16 *StartingOffsetStr;
CHAR16 *EndingOffsetStr;
MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *Offset;
- UINT64 StartingOffset;
- UINT64 EndingOffset;
StartingOffsetStr = GetNextParamStr (&TextDeviceNode);
EndingOffsetStr = GetNextParamStr (&TextDeviceNode);
@@ -2600,12 +2598,8 @@ DevPathFromTextRelativeOffsetRange (
sizeof (MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH)
);
- Strtoi64 (StartingOffsetStr, &StartingOffset);
- Strtoi64 (EndingOffsetStr, &EndingOffset);
-
- WriteUnaligned64 ((VOID *) &Offset->StartingOffset, StartingOffset);
- WriteUnaligned64 ((VOID *) &Offset->EndingOffset, EndingOffset);
-
+ Strtoi64 (StartingOffsetStr, &Offset->StartingOffset);
+ Strtoi64 (EndingOffsetStr, &Offset->EndingOffset);
return (EFI_DEVICE_PATH_PROTOCOL *) Offset;
}