]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/TcpDxe/ComponentName.c
Nt32Pkg: Removing ipf which is no longer supported from edk2.
[mirror_edk2.git] / NetworkPkg / TcpDxe / ComponentName.c
index 9b4dada6a0ebbd9b5a2d1da370378838a9ed4e70..7e1bef6adcfe5b08d5e320a254631745418e3ea7 100644 (file)
@@ -2,7 +2,7 @@
   Implementation of protocols EFI_COMPONENT_NAME_PROTOCOL and\r
   EFI_COMPONENT_NAME2_PROTOCOL.\r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<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
@@ -231,10 +231,10 @@ TcpComponentNameGetDriverName (
 \r
   @param  Tcp4[in]                   A pointer to the EFI_TCP4_PROTOCOL.\r
 \r
-  \r
+\r
   @retval EFI_SUCCESS                Update the ControllerNameTable of this instance successfully.\r
   @retval EFI_INVALID_PARAMETER      The input parameter is invalid.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 UpdateTcp4Name (\r
@@ -253,15 +253,16 @@ UpdateTcp4Name (
   // Format the child name into the string buffer as:\r
   // TCPv4 (SrcPort=59, DestPort=60, ActiveFlag=TRUE)\r
   //\r
+  ZeroMem (&Tcp4ConfigData, sizeof (Tcp4ConfigData));\r
   Status = Tcp4->GetModeData (Tcp4, NULL, &Tcp4ConfigData, NULL, NULL, NULL);\r
   if (!EFI_ERROR (Status)) {\r
     UnicodeSPrint (HandleName, sizeof (HandleName),\r
-      L"TCPv4 (SrcPort=%d, DestPort=&d, ActiveFlag=%s)",\r
+      L"TCPv4 (SrcPort=%d, DestPort=%d, ActiveFlag=%s)",\r
       Tcp4ConfigData.AccessPoint.StationPort,\r
       Tcp4ConfigData.AccessPoint.RemotePort,\r
       (Tcp4ConfigData.AccessPoint.ActiveFlag ? L"TRUE" : L"FALSE")\r
       );\r
-  } if (Status == EFI_NOT_STARTED) {\r
+  } else if (Status == EFI_NOT_STARTED) {\r
     UnicodeSPrint (\r
       HandleName,\r
       sizeof (HandleName),\r
@@ -275,7 +276,7 @@ UpdateTcp4Name (
     FreeUnicodeStringTable (gTcpControllerNameTable);\r
     gTcpControllerNameTable = NULL;\r
   }\r
-  \r
+\r
   Status = AddUnicodeString2 (\r
              "eng",\r
              gTcpComponentName.SupportedLanguages,\r
@@ -286,7 +287,7 @@ UpdateTcp4Name (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   return AddUnicodeString2 (\r
            "en",\r
            gTcpComponentName2.SupportedLanguages,\r
@@ -301,10 +302,10 @@ UpdateTcp4Name (
 \r
   @param  Tcp6[in]                   A pointer to the EFI_TCP6_PROTOCOL.\r
 \r
-  \r
+\r
   @retval EFI_SUCCESS                Update the ControllerNameTable of this instance successfully.\r
   @retval EFI_INVALID_PARAMETER      The input parameter is invalid.\r
-  \r
+\r
 **/\r
 EFI_STATUS\r
 UpdateTcp6Name (\r
@@ -322,6 +323,7 @@ UpdateTcp6Name (
   //\r
   // Format the child name into the string buffer.\r
   //\r
+  ZeroMem (&Tcp6ConfigData, sizeof (Tcp6ConfigData));\r
   Status = Tcp6->GetModeData (Tcp6, NULL, &Tcp6ConfigData, NULL, NULL, NULL);\r
   if (!EFI_ERROR (Status)) {\r
     UnicodeSPrint (HandleName, sizeof (HandleName),\r
@@ -341,7 +343,7 @@ UpdateTcp6Name (
     FreeUnicodeStringTable (gTcpControllerNameTable);\r
     gTcpControllerNameTable = NULL;\r
   }\r
-  \r
+\r
   Status = AddUnicodeString2 (\r
              "eng",\r
              gTcpComponentName.SupportedLanguages,\r
@@ -352,7 +354,7 @@ UpdateTcp6Name (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  \r
+\r
   return AddUnicodeString2 (\r
            "en",\r
            gTcpComponentName2.SupportedLanguages,\r