]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/BsdSocketLib/listen.c
SecurityPkg/SecureBootConfigDxe: Use StrToGuid in BaseLib
[mirror_edk2.git] / StdLib / BsdSocketLib / listen.c
index 7c6d5f3d396224865b02aad5318791c627b6169b..e8f6b91412db64901fca2fbc976eb90c783686f5 100644 (file)
@@ -1,22 +1,19 @@
 /** @file\r
   Implement the listen API.\r
 \r
-  Copyright (c) 2011, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
+  Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials are licensed and made available under\r
+  the terms and conditions of the BSD License that accompanies this distribution.\r
+  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php.\r
 \r
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
 **/\r
-\r
 #include <SocketInternals.h>\r
 \r
 \r
-/**\r
-  Establish the known port to listen for network connections.\r
+/** Establish the known port to listen for network connections.\r
 \r
   The listen routine places the port into a state that enables connection\r
   attempts.  Connections are placed into FIFO order in a queue to be serviced\r
@@ -35,7 +32,6 @@
 \r
   @return     This routine returns zero (0) if successful or -1 when an error occurs.\r
               In the case of an error, ::errno contains more details.\r
-\r
  **/\r
 int\r
 listen (\r
@@ -45,24 +41,16 @@ listen (
 {\r
   int ListenStatus;\r
   EFI_SOCKET_PROTOCOL * pSocketProtocol;\r
-  EFI_STATUS Status;\r
 \r
-  //\r
   //  Locate the context for this socket\r
-  //\r
   pSocketProtocol = BslFdToSocketProtocol ( s, NULL, &errno );\r
   if ( NULL != pSocketProtocol ) {\r
-    //\r
     //  Enable connections on the known port\r
-    //\r
-    Status = pSocketProtocol->pfnListen ( pSocketProtocol,\r
+    (void) pSocketProtocol->pfnListen ( pSocketProtocol,\r
                                           backlog,\r
                                           &errno );\r
   }\r
-\r
-  //\r
   //  Return the operation stauts\r
-  //\r
   ListenStatus = ( 0 == errno ) ? 0 : -1;\r
   return ListenStatus;\r
 }\r