summaryrefslogtreecommitdiff
path: root/NetworkPkg
diff options
context:
space:
mode:
Diffstat (limited to 'NetworkPkg')
-rw-r--r--NetworkPkg/Application/IpsecConfig/IpSecConfig.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/NetworkPkg/Application/IpsecConfig/IpSecConfig.c b/NetworkPkg/Application/IpsecConfig/IpSecConfig.c
index 1e63bc9622..f64cf9728e 100644
--- a/NetworkPkg/Application/IpsecConfig/IpSecConfig.c
+++ b/NetworkPkg/Application/IpsecConfig/IpSecConfig.c
@@ -719,7 +719,7 @@ InitializeIpSecConfig (
//
// 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");
if (ValueStr != NULL) {
DataType = (EFI_IPSEC_CONFIG_DATA_TYPE) MapStringToInteger (ValueStr, mMapPolicy);
@@ -730,11 +730,12 @@ InitializeIpSecConfig (
}
if (ShellCommandLineGetFlag (ParamPackage, L"-?")) {
- switch (DataType) {
- case (EFI_IPSEC_CONFIG_DATA_TYPE) -1:
- ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IPSEC_CONFIG_HELP), mHiiHandle);
- break;
+ if (DataType == -1) {
+ ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IPSEC_CONFIG_HELP), mHiiHandle);
+ goto Done;
+ }
+ switch (DataType) {
case IPsecConfigDataTypeSpd:
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IPSEC_CONFIG_SPD_HELP), mHiiHandle);
break;