NetworkPkg: Update the IpsecConfig application to fix the GCC4.5 build issue.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11271 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qianouyang 2011-01-25 02:56:06 +00:00
parent f6cf5cf800
commit 14fc747b15
1 changed files with 6 additions and 5 deletions

View File

@ -719,7 +719,7 @@ InitializeIpSecConfig (
// //
// Try to get policy database type. // Try to get policy database type.
// //
DataType = (EFI_IPSEC_CONFIG_DATA_TYPE) -1; DataType = (EFI_IPSEC_CONFIG_DATA_TYPE) - 1;
ValueStr = ShellCommandLineGetValue (ParamPackage, L"-p"); ValueStr = ShellCommandLineGetValue (ParamPackage, L"-p");
if (ValueStr != NULL) { if (ValueStr != NULL) {
DataType = (EFI_IPSEC_CONFIG_DATA_TYPE) MapStringToInteger (ValueStr, mMapPolicy); DataType = (EFI_IPSEC_CONFIG_DATA_TYPE) MapStringToInteger (ValueStr, mMapPolicy);
@ -730,11 +730,12 @@ InitializeIpSecConfig (
} }
if (ShellCommandLineGetFlag (ParamPackage, L"-?")) { if (ShellCommandLineGetFlag (ParamPackage, L"-?")) {
switch (DataType) { if (DataType == -1) {
case (EFI_IPSEC_CONFIG_DATA_TYPE) -1:
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IPSEC_CONFIG_HELP), mHiiHandle); ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IPSEC_CONFIG_HELP), mHiiHandle);
break; goto Done;
}
switch (DataType) {
case IPsecConfigDataTypeSpd: case IPsecConfigDataTypeSpd:
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IPSEC_CONFIG_SPD_HELP), mHiiHandle); ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IPSEC_CONFIG_SPD_HELP), mHiiHandle);
break; break;