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
This commit is contained in:
qhuang8 2009-08-19 13:45:38 +00:00
parent 09e156131d
commit 792a153467
1 changed files with 2 additions and 8 deletions

View File

@ -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;
}