summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524>2011-08-24 20:22:22 +0000
committerlpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524>2011-08-24 20:22:22 +0000
commit9c5172b8fdf63f445365434d01aeaeafae2cfc42 (patch)
tree4e977d6e33a29c0148caeb4d037859e37d915ea8
parentd9481a2069a492d91cfded98be082240cba62dc3 (diff)
downloadedk2-9c5172b8fdf63f445365434d01aeaeafae2cfc42.zip
edk2-9c5172b8fdf63f445365434d01aeaeafae2cfc42.tar.gz
edk2-9c5172b8fdf63f445365434d01aeaeafae2cfc42.tar.bz2
Code cleanup to better match coding standard
Signed-off by: Lee Leahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/EADK@12199 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--StdLib/BsdSocketLib/Socklib_internals.h44
-rw-r--r--StdLib/BsdSocketLib/sethostname.c2
-rw-r--r--StdLib/BsdSocketLib/socket.c9
-rw-r--r--StdLib/EfiSocketLib/Ip4.c20
-rw-r--r--StdLib/EfiSocketLib/Service.c2
-rw-r--r--StdLib/EfiSocketLib/Socket.c38
-rw-r--r--StdLib/EfiSocketLib/Socket.h56
-rw-r--r--StdLib/EfiSocketLib/Tcp4.c65
-rw-r--r--StdLib/EfiSocketLib/Udp4.c20
-rw-r--r--StdLib/EfiSocketLib/UseEfiSocketLib.c12
-rw-r--r--StdLib/Include/Efi/EfiSocketLib.h2
11 files changed, 125 insertions, 145 deletions
diff --git a/StdLib/BsdSocketLib/Socklib_internals.h b/StdLib/BsdSocketLib/Socklib_internals.h
index 802aaeb..4d07382 100644
--- a/StdLib/BsdSocketLib/Socklib_internals.h
+++ b/StdLib/BsdSocketLib/Socklib_internals.h
@@ -15,28 +15,28 @@
#ifndef _SOCKLIB_INTERNALS_H_
#define _SOCKLIB_INTERNALS_H_
-void _sethosthtent(int);
-void _endhosthtent(void);
-void _sethostdnsent(int);
-void _endhostdnsent(void);
-void _setnethtent(int);
-void _endnethtent(void);
-void _setnetdnsent(int);
-void _endnetdnsent(void);
+void _sethosthtent (int);
+void _endhosthtent (void);
+void _sethostdnsent (int);
+void _endhostdnsent (void);
+void _setnethtent (int);
+void _endnethtent (void);
+void _setnetdnsent (int);
+void _endnetdnsent (void);
-struct hostent * _gethostbyhtname(const char *, int);
-struct hostent * _gethostbydnsname(const char *, int);
-struct hostent * _gethostbynisname(const char *, int);
-struct hostent * _gethostbyhtaddr(const char *, int, int);
-struct hostent * _gethostbydnsaddr(const char *, int, int);
-struct hostent * _gethostbynisaddr(const char *, int, int);
-struct netent * _getnetbyhtname(const char *);
-struct netent * _getnetbydnsname(const char *);
-struct netent * _getnetbynisname(const char *);
-struct netent * _getnetbyhtaddr(unsigned long, int);
-struct netent * _getnetbydnsaddr(unsigned long, int);
-struct netent * _getnetbynisaddr(unsigned long, int);
-void _map_v4v6_address(const char *src, char *dst);
-void _map_v4v6_hostent(struct hostent *hp, char **bp, int *len);
+struct hostent * _gethostbyhtname (const char *, int);
+struct hostent * _gethostbydnsname (const char *, int);
+struct hostent * _gethostbynisname (const char *, int);
+struct hostent * _gethostbyhtaddr (const char *, int, int);
+struct hostent * _gethostbydnsaddr (const char *, int, int);
+struct hostent * _gethostbynisaddr (const char *, int, int);
+struct netent * _getnetbyhtname (const char *);
+struct netent * _getnetbydnsname (const char *);
+struct netent * _getnetbynisname (const char *);
+struct netent * _getnetbyhtaddr (unsigned long, int);
+struct netent * _getnetbydnsaddr (unsigned long, int);
+struct netent * _getnetbynisaddr (unsigned long, int);
+void _map_v4v6_address (const char *src, char *dst);
+void _map_v4v6_hostent (struct hostent *hp, char **bp, int *len);
#endif
diff --git a/StdLib/BsdSocketLib/sethostname.c b/StdLib/BsdSocketLib/sethostname.c
index 7863e8c..eb9d914 100644
--- a/StdLib/BsdSocketLib/sethostname.c
+++ b/StdLib/BsdSocketLib/sethostname.c
@@ -97,7 +97,7 @@ Returns:
// Create a zero terminated string for name
//
memcpy ( pName, name, namelen );
- pName [ namelen ] = 0;
+ pName[ namelen ] = 0;
//
// Set the environment variable
diff --git a/StdLib/BsdSocketLib/socket.c b/StdLib/BsdSocketLib/socket.c
index e783292..a79b31d 100644
--- a/StdLib/BsdSocketLib/socket.c
+++ b/StdLib/BsdSocketLib/socket.c
@@ -79,7 +79,7 @@ BslFdToSocketProtocol (
//
// Get the descriptor for the file
//
- pDescriptor = &gMD->fdarray [ s ];
+ pDescriptor = &gMD->fdarray[ s ];
//
// Validate that the descriptor is associated with sockets
@@ -125,7 +125,7 @@ BslSocketProtocolToFd (
// Locate a file descriptor
//
FileDescriptor = FindFreeFD ( VALID_CLOSED );
- if( FileDescriptor < 0 ) {
+ if ( FileDescriptor < 0 ) {
//
// All available FDs are in use
//
@@ -135,7 +135,7 @@ BslSocketProtocolToFd (
//
// Initialize the file descriptor
//
- pDescriptor = &gMD->fdarray [ FileDescriptor ];
+ pDescriptor = &gMD->fdarray[ FileDescriptor ];
pDescriptor->f_offset = 0;
pDescriptor->f_flag = 0;
pDescriptor->f_iflags = DTYPE_SOCKET;
@@ -226,8 +226,7 @@ socket (
type,
protocol,
&errno );
- if ( !EFI_ERROR ( Status ))
- {
+ if ( !EFI_ERROR ( Status )) {
//
// Build the file descriptor for the socket
//
diff --git a/StdLib/EfiSocketLib/Ip4.c b/StdLib/EfiSocketLib/Ip4.c
index d3bd1b0..e42a8e1 100644
--- a/StdLib/EfiSocketLib/Ip4.c
+++ b/StdLib/EfiSocketLib/Ip4.c
@@ -549,7 +549,7 @@ EslIpGetLocalAddress4 (
// Verify the address length
//
LengthInBytes = sizeof ( struct sockaddr_in );
- if ( LengthInBytes <= * pAddressLength ) {
+ if ( LengthInBytes <= *pAddressLength ) {
//
// Return the local address
//
@@ -624,7 +624,7 @@ EslIpGetRemoteAddress4 (
// Verify the address length
//
LengthInBytes = sizeof ( struct sockaddr_in );
- if ( LengthInBytes <= * pAddressLength ) {
+ if ( LengthInBytes <= *pAddressLength ) {
//
// Return the local address
//
@@ -1781,9 +1781,9 @@ EslIpRxCancel4 (
buffer will be returned by either ::IpReceive4 or
::IpPortCloseTxDone4.
- @param Event The receive completion event
+ @param [in] Event The receive completion event
- @param pPort The DT_PORT structure address
+ @param [in] pPort The DT_PORT structure address
**/
VOID
@@ -1887,8 +1887,7 @@ EslIpRxComplete4 (
EslSocketPacketFree ( pPacket, DEBUG_RX );
}
}
- else
- {
+ else {
DEBUG (( DEBUG_RX | DEBUG_INFO,
"ERROR - Receiving packet 0x%08x, on port 0x%08x, Status:%r\r\n",
pPacket,
@@ -2329,7 +2328,7 @@ EslIpTxBuffer4 (
//
Status = EFI_UNSUPPORTED;
pSocket->errno = ENOTCONN;
- * pDataLength = 0;
+ *pDataLength = 0;
//
// Verify that the socket is connected
@@ -2506,9 +2505,9 @@ EslIpTxBuffer4 (
/**
Process the transmit completion
- @param Event The normal transmit completion event
+ @param [in] Event The normal transmit completion event
- @param pPort The DT_PORT structure address
+ @param [in] pPort The DT_PORT structure address
**/
VOID
@@ -2571,8 +2570,7 @@ EslIpTxComplete4 (
pSocket->pTxPacketListTail = NULL;
pPacket = pCurrentPacket;
}
- else
- {
+ else {
DEBUG (( DEBUG_TX | DEBUG_INFO,
"0x%08x: Packet transmitted %d bytes successfully\r\n",
pPacket,
diff --git a/StdLib/EfiSocketLib/Service.c b/StdLib/EfiSocketLib/Service.c
index 49c8884..fcb1059 100644
--- a/StdLib/EfiSocketLib/Service.c
+++ b/StdLib/EfiSocketLib/Service.c
@@ -14,7 +14,7 @@
#include "Socket.h"
-EFI_TCP4_PROTOCOL * mpEfiTcpClose4 [ 1024 ];
+EFI_TCP4_PROTOCOL * mpEfiTcpClose4[ 1024 ];
/**
diff --git a/StdLib/EfiSocketLib/Socket.c b/StdLib/EfiSocketLib/Socket.c
index f95578e..b9b7bba 100644
--- a/StdLib/EfiSocketLib/Socket.c
+++ b/StdLib/EfiSocketLib/Socket.c
@@ -24,7 +24,7 @@
List the network stack connection points for the socket driver.
**/
-CONST DT_SOCKET_BINDING cEslSocketBinding [] = {
+CONST DT_SOCKET_BINDING cEslSocketBinding[] = {
{ L"Ip4",
&gEfiIp4ServiceBindingProtocolGuid,
&mEslIp4ServiceGuid,
@@ -47,7 +47,7 @@ CONST UINTN cEslSocketBindingEntries = DIM ( cEslSocketBinding );
/**
APIs to support the various socket types
**/
-CONST DT_PROTOCOL_API * cEslAfInetApi [] = {
+CONST DT_PROTOCOL_API * cEslAfInetApi[] = {
NULL, // 0
&cEslTcp4Api, // SOCK_STREAM
&cEslUdp4Api, // SOCK_DGRAM
@@ -151,8 +151,7 @@ EslSocket (
// Validate the domain value
//
if (( AF_INET != domain )
- && ( AF_LOCAL != domain ))
- {
+ && ( AF_LOCAL != domain )) {
DEBUG (( DEBUG_ERROR | DEBUG_SOCKET,
"ERROR - Invalid domain value" ));
Status = EFI_INVALID_PARAMETER;
@@ -183,7 +182,7 @@ EslSocket (
//
if (( type >= ApiArraySize )
|| ( NULL == ppApiArray )
- || ( NULL == ppApiArray [ type ])) {
+ || ( NULL == ppApiArray[ type ])) {
DEBUG (( DEBUG_ERROR | DEBUG_SOCKET,
"ERROR - Invalid type value\r\n" ));
Status = EFI_INVALID_PARAMETER;
@@ -194,7 +193,7 @@ EslSocket (
//
// Set the default protocol if necessary
//
- pApi = ppApiArray [ type ];
+ pApi = ppApiArray[ type ];
if ( 0 == protocol ) {
protocol = pApi->DefaultProtocol;
}
@@ -413,8 +412,7 @@ EslSocketAccept (
if ( NULL != pSocket ) {
*pErrno = pSocket->errno;
}
- else
- {
+ else {
Status = EFI_INVALID_PARAMETER;
*pErrno = EBADF;
}
@@ -699,8 +697,7 @@ EslSocketBind (
if ( NULL != pSocket ) {
*pErrno = pSocket->errno;
}
- else
- {
+ else {
Status = EFI_INVALID_PARAMETER;
*pErrno = EBADF;
}
@@ -1131,8 +1128,7 @@ EslSocketConnect (
if ( NULL != pSocket ) {
*pErrno = pSocket->errno;
}
- else
- {
+ else {
//
// Bad socket protocol
//
@@ -1453,8 +1449,7 @@ EslSocketGetLocalAddress (
if ( NULL != pSocket ) {
*pErrno = pSocket->errno;
}
- else
- {
+ else {
Status = EFI_INVALID_PARAMETER;
*pErrno = EBADF;
}
@@ -1556,8 +1551,7 @@ EslSocketGetPeerAddress (
if ( NULL != pSocket ) {
*pErrno = pSocket->errno;
}
- else
- {
+ else {
Status = EFI_INVALID_PARAMETER;
*pErrno = EBADF;
}
@@ -1787,8 +1781,7 @@ EslSocketListen (
if ( NULL != pSocket ) {
*pErrno = pSocket->errno;
}
- else
- {
+ else {
Status = EFI_INVALID_PARAMETER;
*pErrno = EBADF;
}
@@ -2522,8 +2515,7 @@ EslSocketReceive (
if ( NULL != pSocket ) {
*pErrno = pSocket->errno;
}
- else
- {
+ else {
Status = EFI_INVALID_PARAMETER;
*pErrno = EBADF;
}
@@ -2643,8 +2635,7 @@ EslSocketShutdown (
if ( NULL != pSocket ) {
*pErrno = pSocket->errno;
}
- else
- {
+ else {
Status = EFI_INVALID_PARAMETER;
*pErrno = EBADF;
}
@@ -2810,8 +2801,7 @@ EslSocketTransmit (
if ( NULL != pSocket ) {
*pErrno = pSocket->errno;
}
- else
- {
+ else {
Status = EFI_INVALID_PARAMETER;
*pErrno = EBADF;
}
diff --git a/StdLib/EfiSocketLib/Socket.h b/StdLib/EfiSocketLib/Socket.h
index c416e94..c680679 100644
--- a/StdLib/EfiSocketLib/Socket.h
+++ b/StdLib/EfiSocketLib/Socket.h
@@ -38,10 +38,10 @@
#define RX_PACKET_DATA 16384 ///< Maximum number of bytes in a RX packet
#define MAX_UDP_RETRANSMIT 16 ///< UDP retransmit attempts to handle address not mapped
-#define LAYER_SIGNATURE SIGNATURE_32('S','k','t','L') ///< DT_LAYER memory signature
-#define SERVICE_SIGNATURE SIGNATURE_32('S','k','t','S') ///< DT_SERVICE memory signature
-#define SOCKET_SIGNATURE SIGNATURE_32('S','c','k','t') ///< DT_SOCKET memory signature
-#define PORT_SIGNATURE SIGNATURE_32('P','o','r','t') ///< DT_PORT memory signature
+#define LAYER_SIGNATURE SIGNATURE_32 ('S','k','t','L') ///< DT_LAYER memory signature
+#define SERVICE_SIGNATURE SIGNATURE_32 ('S','k','t','S') ///< DT_SERVICE memory signature
+#define SOCKET_SIGNATURE SIGNATURE_32 ('S','c','k','t') ///< DT_SOCKET memory signature
+#define PORT_SIGNATURE SIGNATURE_32 ('P','o','r','t') ///< DT_PORT memory signature
typedef enum
{
@@ -102,7 +102,7 @@ typedef struct
{
EFI_IP4_OVERRIDE_DATA Override; ///< Override data
EFI_IP4_TRANSMIT_DATA TxData; ///< Transmit operation description
- UINT8 Buffer [ 1 ]; ///< Data buffer
+ UINT8 Buffer[ 1 ]; ///< Data buffer
} DT_IP4_TX_DATA;
typedef struct
@@ -110,13 +110,13 @@ typedef struct
EFI_TCP4_RECEIVE_DATA RxData; ///< Receive operation description
size_t ValidBytes; ///< Length of valid data in bytes
UINT8 * pBuffer; ///< Current data pointer
- UINT8 Buffer [ RX_PACKET_DATA ]; ///< Data buffer
+ UINT8 Buffer[ RX_PACKET_DATA ]; ///< Data buffer
} DT_TCP4_RX_DATA;
typedef struct
{
EFI_TCP4_TRANSMIT_DATA TxData; ///< Transmit operation description
- UINT8 Buffer [ 1 ]; ///< Data buffer
+ UINT8 Buffer[ 1 ]; ///< Data buffer
} DT_TCP4_TX_DATA;
typedef struct
@@ -130,7 +130,7 @@ typedef struct
EFI_UDP4_SESSION_DATA Session; ///< Remote network address
EFI_UDP4_TRANSMIT_DATA TxData; ///< Transmit operation description
UINTN RetransmitCount; ///< Retransmit to handle ARP negotiation
- UINT8 Buffer [ 1 ]; ///< Data buffer
+ UINT8 Buffer[ 1 ]; ///< Data buffer
} DT_UDP4_TX_DATA;
typedef struct _DT_PACKET {
@@ -717,7 +717,7 @@ typedef struct _DT_SOCKET {
DT_PACKET * pTxPacketListTail; ///< Normal data list tail
}GCC_DT_SOCKET;
-#define SOCKET_FROM_PROTOCOL(a) CR(a, DT_SOCKET, SocketProtocol, SOCKET_SIGNATURE) ///< Locate DT_SOCKET from protocol
+#define SOCKET_FROM_PROTOCOL(a) CR (a, DT_SOCKET, SocketProtocol, SOCKET_SIGNATURE) ///< Locate DT_SOCKET from protocol
/**
Socket layer control structure
@@ -758,7 +758,7 @@ typedef struct {
EFI_TCP4_PROTOCOL ** ppTcpClose4; ///< Ring buffer to close TCP4 ports
} DT_LAYER;
-#define LAYER_FROM_SERVICE(a) CR(a, DT_LAYER, ServiceBinding, LAYER_SIGNATURE) ///< Locate DT_LAYER from service binding
+#define LAYER_FROM_SERVICE(a) CR (a, DT_LAYER, ServiceBinding, LAYER_SIGNATURE) ///< Locate DT_LAYER from service binding
//------------------------------------------------------------------------------
// Data
@@ -1140,9 +1140,9 @@ EslIpRxCancel4 (
buffer will be returned by either ::IpReceive4 or
::IpPortCloseTxDone4.
- @param Event The receive completion event
+ @param [in] Event The receive completion event
- @param pPort The DT_PORT structure address
+ @param [in] pPort The DT_PORT structure address
**/
VOID
@@ -1237,9 +1237,9 @@ EslIpTxBuffer4 (
/**
Process the transmit completion
- @param Event The normal transmit completion event
+ @param [in] Event The normal transmit completion event
- @param pPort The DT_PORT structure address
+ @param [in] pPort The DT_PORT structure address
**/
VOID
@@ -1446,9 +1446,9 @@ EslTcpListen4 (
A system has initiated a connection attempt with a socket in the
listen state. Attempt to complete the connection.
- @param Event The listeen completion event
+ @param [in] Event The listeen completion event
- @param pPort The DT_PORT structure address
+ @param [in] pPort The DT_PORT structure address
**/
VOID
@@ -1502,9 +1502,9 @@ EslTcpPortClose4 (
/**
Process the port close completion
- @param Event The close completion event
+ @param [in] Event The close completion event
- @param pPort The DT_PORT structure address
+ @param [in] pPort The DT_PORT structure address
**/
VOID
@@ -1613,9 +1613,9 @@ EslTcpRxCancel4 (
Buffer the data that was just received.
- @param Event The receive completion event
+ @param [in] Event The receive completion event
- @param pPort The DT_PORT structure address
+ @param [in] pPort The DT_PORT structure address
**/
VOID
@@ -1703,9 +1703,9 @@ EslTcpTxBuffer4 (
/**
Process the normal data transmit completion
- @param Event The normal transmit completion event
+ @param [in] Event The normal transmit completion event
- @param pPort The DT_PORT structure address
+ @param [in] pPort The DT_PORT structure address
**/
VOID
@@ -1717,9 +1717,9 @@ EslTcpTxComplete4 (
/**
Process the urgent data transmit completion
- @param Event The urgent transmit completion event
+ @param [in] Event The urgent transmit completion event
- @param pPort The DT_PORT structure address
+ @param [in] pPort The DT_PORT structure address
**/
VOID
@@ -2012,9 +2012,9 @@ EslUdpRxCancel4 (
buffer will be returned by either ::UdpReceive4 or
::UdpPortCloseTxDone4.
- @param Event The receive completion event
+ @param [in] Event The receive completion event
- @param pPort The DT_PORT structure address
+ @param [in] pPort The DT_PORT structure address
**/
VOID
@@ -2052,9 +2052,9 @@ EslUdpRxStart4 (
/**
Process the transmit completion
- @param Event The normal transmit completion event
+ @param [in] Event The normal transmit completion event
- @param pPort The DT_PORT structure address
+ @param [in] pPort The DT_PORT structure address
**/
VOID
diff --git a/StdLib/EfiSocketLib/Tcp4.c b/StdLib/EfiSocketLib/Tcp4.c
index 28db125..bec5dbe 100644
--- a/StdLib/EfiSocketLib/Tcp4.c
+++ b/StdLib/EfiSocketLib/Tcp4.c
@@ -399,9 +399,9 @@ EslTcpConnectAttempt4 (
connection attempt was successful, then release all of the other
ports.
- @param Event The connect completion event
+ @param [in] Event The connect completion event
- @param pPort The DT_PORT structure address
+ @param [in] pPort The DT_PORT structure address
**/
VOID
@@ -439,10 +439,10 @@ EslTcpConnectComplete4 (
DEBUG (( DEBUG_CONNECT,
"0x%08x: Port connected to %d.%d.%d.%d:%d\r\n",
pPort,
- pTcp4->ConfigData.AccessPoint.RemoteAddress.Addr [0],
- pTcp4->ConfigData.AccessPoint.RemoteAddress.Addr [1],
- pTcp4->ConfigData.AccessPoint.RemoteAddress.Addr [2],
- pTcp4->ConfigData.AccessPoint.RemoteAddress.Addr [3],
+ pTcp4->ConfigData.AccessPoint.RemoteAddress.Addr[0],
+ pTcp4->ConfigData.AccessPoint.RemoteAddress.Addr[1],
+ pTcp4->ConfigData.AccessPoint.RemoteAddress.Addr[2],
+ pTcp4->ConfigData.AccessPoint.RemoteAddress.Addr[3],
pTcp4->ConfigData.AccessPoint.RemotePort ));
//
@@ -457,10 +457,10 @@ EslTcpConnectComplete4 (
DEBUG (( DEBUG_CONNECT,
"0x%08x: Port connection to %d.%d.%d.%d:%d failed, Status: %r\r\n",
pPort,
- pTcp4->ConfigData.AccessPoint.RemoteAddress.Addr [0],
- pTcp4->ConfigData.AccessPoint.RemoteAddress.Addr [1],
- pTcp4->ConfigData.AccessPoint.RemoteAddress.Addr [2],
- pTcp4->ConfigData.AccessPoint.RemoteAddress.Addr [3],
+ pTcp4->ConfigData.AccessPoint.RemoteAddress.Addr[0],
+ pTcp4->ConfigData.AccessPoint.RemoteAddress.Addr[1],
+ pTcp4->ConfigData.AccessPoint.RemoteAddress.Addr[2],
+ pTcp4->ConfigData.AccessPoint.RemoteAddress.Addr[3],
pTcp4->ConfigData.AccessPoint.RemotePort,
Status ));
@@ -813,7 +813,7 @@ EslTcpGetLocalAddress4 (
// Verify the address length
//
LengthInBytes = sizeof ( struct sockaddr_in );
- if ( LengthInBytes <= * pAddressLength ) {
+ if ( LengthInBytes <= *pAddressLength ) {
//
// Return the local address
//
@@ -889,7 +889,7 @@ EslTcpGetRemoteAddress4 (
// Verify the address length
//
LengthInBytes = sizeof ( struct sockaddr_in );
- if ( LengthInBytes <= * pAddressLength ) {
+ if ( LengthInBytes <= *pAddressLength ) {
//
// Return the local address
//
@@ -1095,8 +1095,7 @@ EslTcpListen4 (
//
// Close the port upon error
//
- if ( EFI_ERROR ( Status ))
- {
+ if ( EFI_ERROR ( Status )) {
EslTcpPortCloseStart4 ( pPort, TRUE, DEBUG_LISTEN );
}
@@ -1149,9 +1148,9 @@ EslTcpListen4 (
A system has initiated a connection attempt with a socket in the
listen state. Attempt to complete the connection.
- @param Event The listen completion event
+ @param [in] Event The listen completion event
- @param pPort The DT_PORT structure address
+ @param [in] pPort The DT_PORT structure address
**/
VOID
@@ -1920,9 +1919,9 @@ EslTcpPortClose4 (
/**
Process the port close completion
- @param Event The close completion event
+ @param [in] Event The close completion event
- @param pPort The DT_PORT structure address
+ @param [in] pPort The DT_PORT structure address
**/
VOID
@@ -2077,8 +2076,7 @@ EslTcpPortCloseRxDone4 (
//
Status = EslTcpPortClose4 ( pPort );
}
- else
- {
+ else {
DEBUG (( DEBUG_CLOSE | DEBUG_INFO,
"0x%08x: Port Close: Close operation still pending!\r\n",
pPort ));
@@ -2588,9 +2586,9 @@ EslTcpRxCancel4 (
Buffer the data that was just received.
- @param Event The receive completion event
+ @param [in] Event The receive completion event
- @param pPort The DT_PORT structure address
+ @param [in] pPort The DT_PORT structure address
**/
VOID
@@ -2694,8 +2692,7 @@ EslTcpRxComplete4 (
pSocket->RxBytes ));
}
}
- else
- {
+ else {
DEBUG (( DEBUG_RX | DEBUG_INFO,
"ERROR - Receiving packet 0x%08x, on port 0x%08x, Status:%r\r\n",
pPacket,
@@ -2798,8 +2795,8 @@ EslTcpRxStart4 (
pTcp4->RxToken.Packet.RxData = &pPacket->Op.Tcp4Rx.RxData;
pPacket->Op.Tcp4Rx.RxData.DataLength = (UINT32) LengthInBytes;
pPacket->Op.Tcp4Rx.RxData.FragmentCount = 1;
- pPacket->Op.Tcp4Rx.RxData.FragmentTable [0].FragmentLength = (UINT32) LengthInBytes;
- pPacket->Op.Tcp4Rx.RxData.FragmentTable [0].FragmentBuffer = &pPacket->Op.Tcp4Rx.Buffer [0];
+ pPacket->Op.Tcp4Rx.RxData.FragmentTable[0].FragmentLength = (UINT32) LengthInBytes;
+ pPacket->Op.Tcp4Rx.RxData.FragmentTable[0].FragmentBuffer = &pPacket->Op.Tcp4Rx.Buffer[0];
pTcp4->pReceivePending = pPacket;
//
@@ -3006,7 +3003,7 @@ EslTcpTxBuffer4 (
//
Status = EFI_UNSUPPORTED;
pSocket->errno = ENOTCONN;
- * pDataLength = 0;
+ *pDataLength = 0;
//
// Verify that the socket is connected
@@ -3169,9 +3166,9 @@ EslTcpTxBuffer4 (
/**
Process the normal data transmit completion
- @param Event The normal transmit completion event
+ @param [in] Event The normal transmit completion event
- @param pPort The DT_PORT structure address
+ @param [in] pPort The DT_PORT structure address
**/
VOID
@@ -3231,8 +3228,7 @@ EslTcpTxComplete4 (
pSocket->pTxPacketListTail = NULL;
pPacket = pCurrentPacket;
}
- else
- {
+ else {
DEBUG (( DEBUG_TX | DEBUG_INFO,
"0x%08x: Packet transmitted %d bytes successfully\r\n",
pPacket,
@@ -3274,9 +3270,9 @@ EslTcpTxComplete4 (
/**
Process the urgent data transmit completion
- @param Event The urgent transmit completion event
+ @param [in] Event The urgent transmit completion event
- @param pPort The DT_PORT structure address
+ @param [in] pPort The DT_PORT structure address
**/
VOID
@@ -3337,8 +3333,7 @@ EslTcpTxOobComplete4 (
pSocket->pTxOobPacketListTail = NULL;
pPacket = pCurrentPacket;
}
- else
- {
+ else {
DEBUG (( DEBUG_TX | DEBUG_INFO,
"0x%08x: Urgent packet transmitted %d bytes successfully\r\n",
pPacket,
diff --git a/StdLib/EfiSocketLib/Udp4.c b/StdLib/EfiSocketLib/Udp4.c
index a1df56b..6d3e2d2 100644
--- a/StdLib/EfiSocketLib/Udp4.c
+++ b/StdLib/EfiSocketLib/Udp4.c
@@ -1107,7 +1107,7 @@ EslUdpGetLocalAddress4 (
// Verify the address length
//
LengthInBytes = sizeof ( struct sockaddr_in );
- if ( LengthInBytes <= * pAddressLength ) {
+ if ( LengthInBytes <= *pAddressLength ) {
//
// Return the local address
//
@@ -1183,7 +1183,7 @@ EslUdpGetRemoteAddress4 (
// Verify the address length
//
LengthInBytes = sizeof ( struct sockaddr_in );
- if ( LengthInBytes <= * pAddressLength ) {
+ if ( LengthInBytes <= *pAddressLength ) {
//
// Return the local address
//
@@ -1575,9 +1575,9 @@ EslUdpRxCancel4 (
buffer will be returned by either ::UdpReceive4 or
::UdpPortCloseTxDone4.
- @param Event The receive completion event
+ @param [in] Event The receive completion event
- @param pPort The DT_PORT structure address
+ @param [in] pPort The DT_PORT structure address
**/
VOID
@@ -1683,8 +1683,7 @@ EslUdpRxComplete4 (
EslSocketPacketFree ( pPacket, DEBUG_RX );
}
}
- else
- {
+ else {
DEBUG (( DEBUG_RX | DEBUG_INFO,
"ERROR - Receiving packet 0x%08x, on port 0x%08x, Status:%r\r\n",
pPacket,
@@ -2118,7 +2117,7 @@ EslUdpTxBuffer4 (
//
Status = EFI_UNSUPPORTED;
pSocket->errno = ENOTCONN;
- * pDataLength = 0;
+ *pDataLength = 0;
//
// Verify that the socket is connected
@@ -2286,9 +2285,9 @@ EslUdpTxBuffer4 (
/**
Process the transmit completion
- @param Event The normal transmit completion event
+ @param [in] Event The normal transmit completion event
- @param pPort The DT_PORT structure address
+ @param [in] pPort The DT_PORT structure address
**/
VOID
@@ -2375,8 +2374,7 @@ EslUdpTxComplete4 (
pSocket->pTxPacketListTail = NULL;
pPacket = pCurrentPacket;
}
- else
- {
+ else {
DEBUG (( DEBUG_TX | DEBUG_INFO,
"0x%08x: Packet transmitted %d bytes successfully\r\n",
pPacket,
diff --git a/StdLib/EfiSocketLib/UseEfiSocketLib.c b/StdLib/EfiSocketLib/UseEfiSocketLib.c
index b0d9f54..039f9e6 100644
--- a/StdLib/EfiSocketLib/UseEfiSocketLib.c
+++ b/StdLib/EfiSocketLib/UseEfiSocketLib.c
@@ -107,8 +107,8 @@ EslServiceNetworkConnect (
//
// Connect the network devices
//
- pSocketBinding = &cEslSocketBinding [0];
- pEnd = &pSocketBinding [ cEslSocketBindingEntries ];
+ pSocketBinding = &cEslSocketBinding[0];
+ pEnd = &pSocketBinding[ cEslSocketBindingEntries ];
while ( pEnd > pSocketBinding ) {
//
// Attempt to locate the network adapters
@@ -129,7 +129,7 @@ EslServiceNetworkConnect (
//
for ( Index = 0; HandleCount > Index; Index++ ) {
Status = EslServiceConnect ( gImageHandle,
- pHandles [ Index ]);
+ pHandles[ Index ]);
if ( EFI_ERROR ( Status )) {
break;
}
@@ -183,8 +183,8 @@ EslServiceNetworkDisconnect (
//
// Disconnect the network devices
//
- pSocketBinding = &cEslSocketBinding [0];
- pEnd = &pSocketBinding [ cEslSocketBindingEntries ];
+ pSocketBinding = &cEslSocketBinding[0];
+ pEnd = &pSocketBinding[ cEslSocketBindingEntries ];
while ( pEnd > pSocketBinding ) {
//
// Attempt to locate the network adapters
@@ -205,7 +205,7 @@ EslServiceNetworkDisconnect (
//
for ( Index = 0; HandleCount > Index; Index++ ) {
Status = EslServiceDisconnect ( gImageHandle,
- pHandles [ Index ]);
+ pHandles[ Index ]);
if ( EFI_ERROR ( Status )) {
break;
}
diff --git a/StdLib/Include/Efi/EfiSocketLib.h b/StdLib/Include/Efi/EfiSocketLib.h
index 3205560..3b3aa9d 100644
--- a/StdLib/Include/Efi/EfiSocketLib.h
+++ b/StdLib/Include/Efi/EfiSocketLib.h
@@ -147,7 +147,7 @@ extern CONST EFI_GUID mEslUdp4ServiceGuid;
// Data
//------------------------------------------------------------------------------
-extern CONST DT_SOCKET_BINDING cEslSocketBinding [];
+extern CONST DT_SOCKET_BINDING cEslSocketBinding[];
extern CONST UINTN cEslSocketBindingEntries;
//------------------------------------------------------------------------------