mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-16 13:16:49 +08:00
minor/coding style: removed spaces before line ending
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* Sequential API External module
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001-2004 Swedish Institute of Computer Science.
|
||||
* All rights reserved.
|
||||
|
||||
@@ -350,7 +350,7 @@ sent_tcp(void *arg, struct tcp_pcb *pcb, u16_t len)
|
||||
API_EVENT(conn, NETCONN_EVT_SENDPLUS, len);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
@@ -1466,7 +1466,7 @@ lwip_netconn_do_writemore(struct netconn *conn WRITE_DELAYED_PARAM)
|
||||
if (available < len) {
|
||||
/* don't try to write more than sendbuf */
|
||||
len = available;
|
||||
if (dontblock) {
|
||||
if (dontblock) {
|
||||
if (!len) {
|
||||
err = ERR_WOULDBLOCK;
|
||||
goto err_mem;
|
||||
@@ -1760,7 +1760,7 @@ lwip_netconn_do_close(struct api_msg_msg *msg)
|
||||
*/
|
||||
void
|
||||
lwip_netconn_do_join_leave_group(struct api_msg_msg *msg)
|
||||
{
|
||||
{
|
||||
if (ERR_IS_FATAL(msg->conn->last_err)) {
|
||||
msg->err = msg->conn->last_err;
|
||||
} else {
|
||||
|
||||
@@ -57,7 +57,7 @@ static const char *err_strerr[] = {
|
||||
"Connection reset.", /* ERR_RST -13 */
|
||||
"Connection closed.", /* ERR_CLSD -14 */
|
||||
"Illegal argument.", /* ERR_ARG -15 */
|
||||
"Low-level netif error.", /* ERR_IF -16 */
|
||||
"Low-level netif error." /* ERR_IF -16 */
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -70,7 +70,6 @@ const char *
|
||||
lwip_strerr(err_t err)
|
||||
{
|
||||
return err_strerr[-err];
|
||||
|
||||
}
|
||||
|
||||
#endif /* LWIP_DEBUG */
|
||||
|
||||
@@ -256,7 +256,7 @@ lwip_freeaddrinfo(struct addrinfo *ai)
|
||||
*
|
||||
* @param nodename descriptive name or address string of the host
|
||||
* (may be NULL -> local address)
|
||||
* @param servname port number as string of NULL
|
||||
* @param servname port number as string of NULL
|
||||
* @param hints structure containing input values that set socktype and protocol
|
||||
* @param res pointer to a pointer where to store the result (set to NULL on failure)
|
||||
* @return 0 on success, non-zero on failure
|
||||
@@ -286,7 +286,7 @@ lwip_getaddrinfo(const char *nodename, const char *servname,
|
||||
|
||||
if (hints != NULL) {
|
||||
ai_family = hints->ai_family;
|
||||
if ((ai_family != AF_UNSPEC)
|
||||
if ((ai_family != AF_UNSPEC)
|
||||
#if LWIP_IPV4
|
||||
&& (ai_family != AF_INET)
|
||||
#endif /* LWIP_IPV4 */
|
||||
|
||||
@@ -771,7 +771,7 @@ lwip_recvfrom(int s, void *mem, size_t len, int flags,
|
||||
buf = sock->lastdata;
|
||||
} else {
|
||||
/* If this is non-blocking call, then check first */
|
||||
if (((flags & MSG_DONTWAIT) || netconn_is_nonblocking(sock->conn)) &&
|
||||
if (((flags & MSG_DONTWAIT) || netconn_is_nonblocking(sock->conn)) &&
|
||||
(sock->rcvevent <= 0)) {
|
||||
if (off > 0) {
|
||||
/* update receive window */
|
||||
@@ -847,9 +847,9 @@ lwip_recvfrom(int s, void *mem, size_t len, int flags,
|
||||
if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) {
|
||||
LWIP_ASSERT("invalid copylen, len would underflow", len >= copylen);
|
||||
len -= copylen;
|
||||
if ( (len <= 0) ||
|
||||
(p->flags & PBUF_FLAG_PUSH) ||
|
||||
(sock->rcvevent <= 0) ||
|
||||
if ( (len <= 0) ||
|
||||
(p->flags & PBUF_FLAG_PUSH) ||
|
||||
(sock->rcvevent <= 0) ||
|
||||
((flags & MSG_PEEK)!=0)) {
|
||||
done = 1;
|
||||
}
|
||||
@@ -1274,7 +1274,7 @@ int
|
||||
lwip_writev(int s, const struct iovec *iov, int iovcnt)
|
||||
{
|
||||
struct msghdr msg;
|
||||
|
||||
|
||||
msg.msg_name = NULL;
|
||||
msg.msg_namelen = 0;
|
||||
/* Hack: we have to cast via number to cast from 'const' pointer to non-const.
|
||||
|
||||
@@ -374,7 +374,7 @@ tcpip_apimsg(struct api_msg *apimsg)
|
||||
/* catch functions that don't set err */
|
||||
apimsg->msg.err = ERR_VAL;
|
||||
#endif
|
||||
|
||||
|
||||
if (sys_mbox_valid_val(mbox)) {
|
||||
TCPIP_MSG_VAR_ALLOC(msg);
|
||||
TCPIP_MSG_VAR_REF(msg).type = TCPIP_MSG_API;
|
||||
@@ -417,7 +417,7 @@ tcpip_netifapi(struct netifapi_msg* netifapimsg)
|
||||
netifapimsg->msg.err = err;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
TCPIP_MSG_VAR_REF(msg).type = TCPIP_MSG_NETIFAPI;
|
||||
TCPIP_MSG_VAR_REF(msg).msg.netifapimsg = netifapimsg;
|
||||
sys_mbox_post(&mbox, &TCPIP_MSG_VAR_REF(msg));
|
||||
@@ -440,7 +440,7 @@ tcpip_netifapi(struct netifapi_msg* netifapimsg)
|
||||
err_t
|
||||
tcpip_netifapi_lock(struct netifapi_msg* netifapimsg)
|
||||
{
|
||||
LOCK_TCPIP_CORE();
|
||||
LOCK_TCPIP_CORE();
|
||||
netifapimsg->function(&(netifapimsg->msg));
|
||||
UNLOCK_TCPIP_CORE();
|
||||
return netifapimsg->msg.err;
|
||||
|
||||
Reference in New Issue
Block a user