]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/Sec: Use EFI_COMMON_SECTION_HEADER to avoid casts
authorThomas Palmer <thomas.palmer@hpe.com>
Wed, 27 Jul 2016 06:48:14 +0000 (01:48 -0500)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 27 Jul 2016 13:40:51 +0000 (15:40 +0200)
Drop superfluous casts. There is no change in behavior because
EFI_FIRMWARE_VOLUME_IMAGE_SECTION is just a typedef of
EFI_COMMON_SECTION_HEADER.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
OvmfPkg/Sec/SecMain.c

index a12e6768ae26c28447a5c80e314e7c76fffa6b64..384fa747355082564746a1bfade0a5b978e0aac0 100644 (file)
@@ -2,6 +2,7 @@
   Main SEC phase code.  Transitions to PEI.\r
 \r
   Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR>\r
+  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -332,11 +333,11 @@ DecompressMemFvs (
   UINT32                            AuthenticationStatus;\r
   VOID                              *OutputBuffer;\r
   VOID                              *ScratchBuffer;\r
-  EFI_FIRMWARE_VOLUME_IMAGE_SECTION *FvSection;\r
+  EFI_COMMON_SECTION_HEADER         *FvSection;\r
   EFI_FIRMWARE_VOLUME_HEADER        *PeiMemFv;\r
   EFI_FIRMWARE_VOLUME_HEADER        *DxeMemFv;\r
 \r
-  FvSection = (EFI_FIRMWARE_VOLUME_IMAGE_SECTION*) NULL;\r
+  FvSection = (EFI_COMMON_SECTION_HEADER*) NULL;\r
 \r
   Status = FindFfsFileAndSection (\r
              *Fv,\r
@@ -386,7 +387,7 @@ DecompressMemFvs (
              OutputBufferSize,\r
              EFI_SECTION_FIRMWARE_VOLUME_IMAGE,\r
              0,\r
-             (EFI_COMMON_SECTION_HEADER**) &FvSection\r
+             &FvSection\r
              );\r
   if (EFI_ERROR (Status)) {\r
     DEBUG ((EFI_D_ERROR, "Unable to find PEI FV section\n"));\r
@@ -411,7 +412,7 @@ DecompressMemFvs (
              OutputBufferSize,\r
              EFI_SECTION_FIRMWARE_VOLUME_IMAGE,\r
              1,\r
-             (EFI_COMMON_SECTION_HEADER**) &FvSection\r
+             &FvSection\r
              );\r
   if (EFI_ERROR (Status)) {\r
     DEBUG ((EFI_D_ERROR, "Unable to find DXE FV section\n"));\r