Revision: 16767
          http://sourceforge.net/p/edk2/code/16767
Author:   vanjeff
Date:     2015-02-05 06:03:02 +0000 (Thu, 05 Feb 2015)
Log Message:
-----------
Initialize data and correct faulty logic in TcpComponentNameGetControllerName().

(Sync patch r16742 from main trunk.)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <[email protected]>
Reviewed-by: Ye Ting <[email protected]>
Reviewed-by: Fu Siyuan <[email protected]>

Revision Links:
--------------
    http://sourceforge.net/p/edk2/code/16742

Modified Paths:
--------------
    branches/UDK2014.SP1/NetworkPkg/TcpDxe/ComponentName.c

Modified: branches/UDK2014.SP1/NetworkPkg/TcpDxe/ComponentName.c
===================================================================
--- branches/UDK2014.SP1/NetworkPkg/TcpDxe/ComponentName.c      2015-02-05 
06:02:17 UTC (rev 16766)
+++ branches/UDK2014.SP1/NetworkPkg/TcpDxe/ComponentName.c      2015-02-05 
06:03:02 UTC (rev 16767)
@@ -2,7 +2,7 @@
   Implementation of protocols EFI_COMPONENT_NAME_PROTOCOL and
   EFI_COMPONENT_NAME2_PROTOCOL.
 
-  Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
 
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD 
License
@@ -253,6 +253,7 @@
   // Format the child name into the string buffer as:
   // TCPv4 (SrcPort=59, DestPort=60, ActiveFlag=TRUE)
   //
+  ZeroMem (&Tcp4ConfigData, sizeof (Tcp4ConfigData));
   Status = Tcp4->GetModeData (Tcp4, NULL, &Tcp4ConfigData, NULL, NULL, NULL);
   if (!EFI_ERROR (Status)) {
     UnicodeSPrint (HandleName, sizeof (HandleName),
@@ -261,7 +262,7 @@
       Tcp4ConfigData.AccessPoint.RemotePort,
       (Tcp4ConfigData.AccessPoint.ActiveFlag ? L"TRUE" : L"FALSE")
       );
-  } if (Status == EFI_NOT_STARTED) {
+  } else if (Status == EFI_NOT_STARTED) {
     UnicodeSPrint (
       HandleName,
       sizeof (HandleName),
@@ -322,6 +323,7 @@
   //
   // Format the child name into the string buffer.
   //
+  ZeroMem (&Tcp6ConfigData, sizeof (Tcp6ConfigData));
   Status = Tcp6->GetModeData (Tcp6, NULL, &Tcp6ConfigData, NULL, NULL, NULL);
   if (!EFI_ERROR (Status)) {
     UnicodeSPrint (HandleName, sizeof (HandleName),


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to