From 792a1534671f5e326a5add71eef4c6a7bd3a019c Mon Sep 17 00:00:00 2001 From: qhuang8 Date: Wed, 19 Aug 2009 13:45:38 +0000 Subject: 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 --- MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'MdeModulePkg') 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; } -- cgit v1.2.3