Minor changes in lwip folder: fix some warnings, coding style, and rename "internal" netconn_alloc function.

This commit is contained in:
fbernon
2008-01-04 23:07:44 +00:00
parent 32005617b9
commit 9c4daa312d
8 changed files with 18 additions and 12 deletions

View File

@@ -71,7 +71,7 @@ netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto,
struct netconn *conn;
struct api_msg msg;
conn = netconn_alloc_with_proto_and_callback(t, proto, callback);
conn = netconn_alloc(t, callback);
if (conn != NULL ) {
msg.function = do_newconn;
msg.msg.msg.n.proto = proto;

View File

@@ -338,7 +338,7 @@ accept_function(void *arg, struct tcp_pcb *newpcb, err_t err)
/* We have to set the callback here even though
* the new socket is unknown. conn->socket is marked as -1. */
newconn = netconn_alloc_with_proto_and_callback(conn->type, 0, conn->callback);
newconn = netconn_alloc(conn->type, conn->callback);
if (newconn == NULL) {
return ERR_MEM;
}
@@ -446,7 +446,7 @@ do_newconn(struct api_msg_msg *msg)
* NULL on memory error
*/
struct netconn*
netconn_alloc_with_proto_and_callback(enum netconn_type t, u8_t proto,
netconn_alloc(enum netconn_type t,
void (*callback)(struct netconn *, enum netconn_evt, u16_t len))
{
struct netconn *conn;
@@ -469,7 +469,7 @@ netconn_alloc_with_proto_and_callback(enum netconn_type t, u8_t proto,
memp_free(MEMP_NETCONN, conn);
return NULL;
}
conn->acceptmbox = SYS_MBOX_NULL;
conn->acceptmbox = SYS_MBOX_NULL;
conn->state = NETCONN_NONE;
/* initialize socket to -1 since 0 is a valid socket */
conn->socket = -1;

View File

@@ -269,7 +269,7 @@ lwip_getaddrinfo(const char *nodename, const char *servname,
err_t err;
struct ip_addr addr;
struct addrinfo *ai;
struct sockaddr_in *sa;
struct sockaddr_in *sa = NULL;
int port_nr = 0;
if (res == NULL) {