make minix lwip make explicit use of 'int'

makes lwip use "unsigned int" instead of "unsigned" since this is
more obvious (i.e. type is not implied).

Change-Id: I852eb80484516e1235241d55be3e15174fa24109
This commit is contained in:
Michael W. Bombardieri 2013-04-11 22:37:30 +02:00 committed by Ben Gras
parent 435f2b0095
commit a806c5feb1
8 changed files with 36 additions and 36 deletions

View file

@ -40,9 +40,9 @@ static ip_addr_t ip_addr_none = { IPADDR_NONE };
extern endpoint_t lwip_ep;
void nic_assign_driver(const char * dev_type,
unsigned dev_num,
unsigned int dev_num,
const char * driver_name,
unsigned instance,
unsigned int instance,
int is_default)
{
struct nic * nic;
@ -106,7 +106,7 @@ static struct nic * lookup_nic_default(void)
void nic_init_all(void)
{
int i;
unsigned g;
unsigned int g;
for (i = 0; i < MAX_DEVS; i++) {
devices[i].drv_ep = NONE;
@ -176,7 +176,7 @@ static void nic_up(struct nic * nic, message * m)
int driver_tx(struct nic * nic)
{
struct packet_q * pkt;
unsigned len;
unsigned int len;
message m;
int err;
@ -262,8 +262,8 @@ static int raw_receive(message * m,
struct pbuf *pbuf)
{
struct pbuf * p;
unsigned rem_len = m->COUNT;
unsigned written = 0;
unsigned int rem_len = m->COUNT;
unsigned int written = 0;
int err;
debug_print("user buffer size : %d\n", rem_len);
@ -343,7 +343,7 @@ int raw_socket_input(struct pbuf * pbuf, struct nic * nic)
return 0;
}
static void nic_pkt_received(struct nic * nic, unsigned size)
static void nic_pkt_received(struct nic * nic, unsigned int size)
{
assert(nic->netif.input);

View file

@ -13,7 +13,7 @@
struct packet_q {
struct packet_q * next;
unsigned buf_len;
unsigned int buf_len;
char buf[];
};
@ -22,7 +22,7 @@ struct packet_q {
#define DRV_RECEIVING 2
struct nic {
unsigned flags;
unsigned int flags;
char name[NIC_NAME_LEN];
char drv_name[DRV_NAME_LEN];
endpoint_t drv_ep;
@ -37,8 +37,8 @@ struct nic {
struct packet_q * tx_tail;
void * tx_buffer;
struct netif netif;
unsigned max_pkt_sz;
unsigned min_pkt_sz;
unsigned int max_pkt_sz;
unsigned int min_pkt_sz;
struct socket * raw_socket;
};

View file

@ -66,7 +66,7 @@ static void check_mknod(char *device, mode_t mode, int minor)
static int cfg_fd;
static char word[16];
static unsigned char line[256], *lineptr;
static unsigned linenr;
static unsigned int linenr;
static __dead void error(void)
{
@ -164,7 +164,7 @@ void inet_read_conf(void)
while (nextline()) {
token(1);
char drv_name[128];
unsigned instance;
unsigned int instance;
if (strncmp(word, "eth", 3) == 0) {

View file

@ -59,7 +59,7 @@ static void tcp_swatchdog(__unused timer_t *tp)
static int sef_cb_init_fresh(__unused int type, __unused sef_init_info_t *info)
{
int err;
unsigned hz;
unsigned int hz;
char my_name[16];
int my_priv;

View file

@ -20,9 +20,9 @@
/* driver .c */
void nic_assign_driver(const char * dev_type,
unsigned dev_num,
unsigned int dev_num,
const char * driver_name,
unsigned instance,
unsigned int instance,
int is_default);
void nic_init_all(void);
void driver_request(message * m);

View file

@ -69,8 +69,8 @@ static int raw_ip_do_receive(message * m,
struct pbuf *pbuf)
{
struct pbuf * p;
unsigned rem_len = m->COUNT;
unsigned written = 0, hdr_sz = 0;
unsigned int rem_len = m->COUNT;
unsigned int written = 0, hdr_sz = 0;
int err;
debug_print("user buffer size : %d\n", rem_len);
@ -319,7 +319,7 @@ static void raw_ip_get_opt(struct socket * sock, message * m)
ipopt.nwio_rem = pcb->remote_ip.addr;
ipopt.nwio_flags = sock->usr_flags;
if ((unsigned) m->COUNT < sizeof(ipopt)) {
if ((unsigned int) m->COUNT < sizeof(ipopt)) {
sock_reply(sock, EINVAL);
return;
}

View file

@ -29,10 +29,10 @@ static int do_tcp_debug;
#endif
struct wbuf {
unsigned len;
unsigned written;
unsigned unacked;
unsigned rem_len;
unsigned int len;
unsigned int written;
unsigned int unacked;
unsigned int rem_len;
struct wbuf * next;
char data[];
};
@ -197,7 +197,7 @@ __unused static void print_tcp_payload(unsigned char * buf, int len)
static int read_from_tcp(struct socket * sock, message * m)
{
unsigned rem_buf, written = 0;
unsigned int rem_buf, written = 0;
struct pbuf * p;
assert(!(sock->flags & SOCK_FLG_OP_LISTENING) && sock->recv_head);
@ -326,7 +326,7 @@ static void tcp_op_read(struct socket * sock, message * m, int blk)
}
}
static struct wbuf * wbuf_add(struct socket * sock, unsigned sz)
static struct wbuf * wbuf_add(struct socket * sock, unsigned int sz)
{
struct wbuf * wbuf;
struct wbuf_chain * wc = (struct wbuf_chain *)sock->buf;
@ -354,7 +354,7 @@ static struct wbuf * wbuf_add(struct socket * sock, unsigned sz)
return wbuf;
}
static struct wbuf * wbuf_ack_sent(struct socket * sock, unsigned sz)
static struct wbuf * wbuf_ack_sent(struct socket * sock, unsigned int sz)
{
struct wbuf_chain * wc = (struct wbuf_chain *) sock->buf;
struct wbuf ** wb;
@ -393,7 +393,7 @@ static void tcp_op_write(struct socket * sock, message * m, __unused int blk)
{
int ret;
struct wbuf * wbuf;
unsigned snd_buf_len, usr_buf_len;
unsigned int snd_buf_len, usr_buf_len;
u8_t flgs = 0;
@ -570,7 +570,7 @@ static void tcp_get_conf(struct socket * sock, message * m)
(unsigned int) tconf.nwtc_locaddr);
debug_tcp_print("tconf.nwtc_locport = 0x%x", ntohs(tconf.nwtc_locport));
if ((unsigned) m->COUNT < sizeof(tconf)) {
if ((unsigned int) m->COUNT < sizeof(tconf)) {
sock_reply(sock, EINVAL);
return;
}
@ -677,7 +677,7 @@ static err_t tcp_sent_callback(void *arg, struct tcp_pcb *tpcb, u16_t len)
struct socket * sock = (struct socket *) arg;
struct wbuf * wbuf;
struct wbuf_chain * wc = (struct wbuf_chain *) sock->buf;
unsigned snd_buf_len;
unsigned int snd_buf_len;
int ret;
debug_tcp_print("socket num %ld", get_sock_num(sock));
@ -732,7 +732,7 @@ static err_t tcp_sent_callback(void *arg, struct tcp_pcb *tpcb, u16_t len)
wbuf = wc->unsent;
while (wbuf) {
unsigned towrite;
unsigned int towrite;
u8_t flgs = 0;
towrite = (snd_buf_len < wbuf->rem_len ?
@ -834,7 +834,7 @@ static int tcp_do_accept(struct socket * listen_sock,
struct tcp_pcb * newpcb)
{
struct socket * newsock;
unsigned sock_num;
unsigned int sock_num;
int ret;
debug_tcp_print("socket num %ld", get_sock_num(listen_sock));
@ -981,7 +981,7 @@ static void tcp_op_shutdown_tx(struct socket * sock)
static void tcp_op_get_cookie(struct socket * sock, message * m)
{
tcp_cookie_t cookie;
unsigned sock_num;
unsigned int sock_num;
assert(sizeof(cookie) >= sizeof(sock));
@ -1005,7 +1005,7 @@ static void tcp_get_opt(struct socket * sock, message * m)
assert(pcb);
if ((unsigned) m->COUNT < sizeof(tcpopt)) {
if ((unsigned int) m->COUNT < sizeof(tcpopt)) {
sock_reply(sock, EINVAL);
return;
}

View file

@ -83,8 +83,8 @@ static int udp_do_receive(struct socket * sock,
u16_t port)
{
struct pbuf * p;
unsigned rem_len = m->COUNT;
unsigned written = 0, hdr_sz = 0;
unsigned int rem_len = m->COUNT;
unsigned int written = 0, hdr_sz = 0;
int err;
debug_udp_print("user buffer size : %d", rem_len);
@ -372,7 +372,7 @@ static void udp_get_opt(struct socket * sock, message * m)
debug_udp_print("udpopt.nwuo_locport = 0x%x",
ntohs(udpopt.nwuo_locport));
if ((unsigned) m->COUNT < sizeof(udpopt)) {
if ((unsigned int) m->COUNT < sizeof(udpopt)) {
sock_reply(sock, EINVAL);
return;
}