]> git.proxmox.com Git - mirror_edk2.git/commitdiff
NetworkPkg/TlsAuthConfigDxe: Declare EFIAPI for the ChooseFile handler
authorGary Lin <glin@suse.com>
Mon, 16 Jan 2017 06:30:10 +0000 (14:30 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Wed, 18 Jan 2017 04:57:51 +0000 (12:57 +0800)
The ChooseFile handler, UpdateCAFromFile, has to be EFIAPI or gcc would
use the wrong ABI and cause the crash of the firmware. This commit also
removes the unnecessary type casting in ChooseFile.

Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c

index 5f04503887153b2616a0570d13e5abdd50afd839..460364546126efe011a84149aaec11d4667da5ca 100644 (file)
@@ -1218,6 +1218,7 @@ UpdatePage(
   @retval FALSE  Not exit caller function.
 **/
 BOOLEAN
+EFIAPI\r
 UpdateCAFromFile (
   IN EFI_DEVICE_PATH_PROTOCOL    *FilePath
   )
@@ -1728,7 +1729,7 @@ TlsAuthConfigAccessCallback (
       CleanUpPage (LabelId, Private);
       break;
     case KEY_TLS_AUTH_CONFIG_ENROLL_CERT_FROM_FILE:
-      ChooseFile( NULL, NULL, (CHOOSE_HANDLER) UpdateCAFromFile, &File);
+      ChooseFile( NULL, NULL, UpdateCAFromFile, &File);\r
       break;
 
     case KEY_TLS_AUTH_CONFIG_VALUE_SAVE_AND_EXIT: