summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Lin <glin@suse.com>2017-01-16 14:30:10 +0800
committerJiaxin Wu <jiaxin.wu@intel.com>2017-01-18 12:57:51 +0800
commit7be6e6776253d3638f03375e346e978228af5edb (patch)
treed1a803998b55545a1d7deeb686d6505ea3c0ecd3
parent315d9d08fd77db1024ccc5307823da8aaed85e2f (diff)
downloadedk2-7be6e6776253d3638f03375e346e978228af5edb.zip
edk2-7be6e6776253d3638f03375e346e978228af5edb.tar.gz
edk2-7be6e6776253d3638f03375e346e978228af5edb.tar.bz2
NetworkPkg/TlsAuthConfigDxe: Declare EFIAPI for the ChooseFile handler
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>
-rw-r--r--NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
index 5f04503..4603645 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
@@ -1218,6 +1218,7 @@ UpdatePage(
@retval FALSE Not exit caller function.
**/
BOOLEAN
+EFIAPI
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);
break;
case KEY_TLS_AUTH_CONFIG_VALUE_SAVE_AND_EXIT: