]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/ReportStatusCode.c
Refine code to make it more safely.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Dxe / EfiDriverLib / ReportStatusCode.c
index 8ab071fc458f5579d06a1fe27133ddae7d01a37d..6f62a178345f77ef46cb1dd0310b51c231ba59f3 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -88,7 +88,7 @@ Returns:
     if (GET_HOB_TYPE (GuidHob) == EFI_HOB_TYPE_GUID_EXTENSION) {\r
       if (EfiCompareGuid (ProtocolGuid, &GuidHob.Guid->Name)) {\r
         Status     = EFI_SUCCESS;\r
-        *Interface = (VOID *) *(UINTN *) ((UINT8 *) (&GuidHob.Guid->Name) + sizeof (EFI_GUID));\r
+        *Interface = (VOID *) *(UINTN *) (GuidHob.Guid + 1);\r
       }\r
     }\r
 \r