Replaced tabs with space.

This commit is contained in:
christiaans
2006-11-17 10:51:13 +00:00
parent fe1bea9538
commit d4b6471d39
10 changed files with 74 additions and 74 deletions

View File

@@ -495,7 +495,7 @@ static void dhcp_handle_ack(struct netif *netif)
dhcp->dns_count = dhcp_get_option_byte(&option_ptr[1]) / (u32_t)sizeof(struct ip_addr);
/* limit to at most DHCP_MAX_DNS DNS servers */
if (dhcp->dns_count > DHCP_MAX_DNS)
dhcp->dns_count = DHCP_MAX_DNS;
dhcp->dns_count = DHCP_MAX_DNS;
for (n = 0; n < dhcp->dns_count; n++) {
dhcp->offered_dns_addr[n].addr = htonl(dhcp_get_option_long(&option_ptr[2 + n * 4]));
}
@@ -539,18 +539,18 @@ err_t dhcp_start(struct netif *netif)
} else {
LWIP_DEBUGF(DHCP_DEBUG | DBG_TRACE | DBG_STATE | 3, ("dhcp_start(): restarting DHCP configuration\n"));
}
/* clear data structure */
memset(dhcp, 0, sizeof(struct dhcp));
/* clear data structure */
memset(dhcp, 0, sizeof(struct dhcp));
/* allocate UDP PCB */
dhcp->pcb = udp_new();
if (dhcp->pcb == NULL) {
LWIP_DEBUGF(DHCP_DEBUG | DBG_TRACE, ("dhcp_start(): could not obtain pcb\n"));
mem_free((void *)dhcp);
netif->dhcp = dhcp = NULL;
return ERR_MEM;
}
LWIP_DEBUGF(DHCP_DEBUG | DBG_TRACE, ("dhcp_start(): starting DHCP configuration\n"));
dhcp->pcb = udp_new();
if (dhcp->pcb == NULL) {
LWIP_DEBUGF(DHCP_DEBUG | DBG_TRACE, ("dhcp_start(): could not obtain pcb\n"));
mem_free((void *)dhcp);
netif->dhcp = dhcp = NULL;
return ERR_MEM;
}
LWIP_DEBUGF(DHCP_DEBUG | DBG_TRACE, ("dhcp_start(): starting DHCP configuration\n"));
/* (re)start the DHCP negotiation */
result = dhcp_discover(netif);
if (result != ERR_OK) {

View File

@@ -58,7 +58,7 @@
#ifndef LWIP_CHKSUM
#define LWIP_CHKSUM lwip_standard_chksum
#if 1 /* Version A */
#if 1 /* Version A */
/**
* lwip checksum
*
@@ -109,7 +109,7 @@ lwip_standard_chksum(void *dataptr, u16_t len)
}
#endif
#if 0 /* Version B */
#if 0 /* Version B */
/*
* Curt McDowell
* Broadcom Corp.
@@ -161,7 +161,7 @@ lwip_standard_chksum(void *dataptr, int len)
}
#endif
#if 0 /* Version C */
#if 0 /* Version C */
/**
* An optimized checksum routine. Basically, it uses loop-unrolling on
* the checksum loop, treating the head and tail bytes specially, whereas
@@ -339,8 +339,8 @@ inet_chksum_pbuf(struct pbuf *p)
#define isxdigit(c) (isdigit(c) || in_range(c, 'a', 'f') || in_range(c, 'A', 'F'))
#define islower(c) in_range(c, 'a', 'z')
#define isspace(c) (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v')
#endif
#endif
/*
* Ascii internet address interpretation routine.
* The value returned is in network order.
@@ -386,20 +386,20 @@ inet_aton(const char *cp, struct in_addr *addr)
if (c == '0') {
c = *++cp;
if (c == 'x' || c == 'X') {
base = 16;
c = *++cp;
base = 16;
c = *++cp;
} else
base = 8;
base = 8;
}
for (;;) {
if (isdigit(c)) {
val = (val * base) + (int)(c - '0');
c = *++cp;
val = (val * base) + (int)(c - '0');
c = *++cp;
} else if (base == 16 && isxdigit(c)) {
val = (val << 4) | (int)(c + 10 - (islower(c) ? 'a' : 'A'));
c = *++cp;
val = (val << 4) | (int)(c + 10 - (islower(c) ? 'a' : 'A'));
c = *++cp;
} else
break;
break;
}
if (c == '.') {
/*
@@ -409,7 +409,7 @@ inet_aton(const char *cp, struct in_addr *addr)
* a.b (with b treated as 24 bits)
*/
if (pp >= parts + 3)
return (0);
return (0);
*pp++ = val;
c = *++cp;
} else

View File

@@ -113,7 +113,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
pbuf_header(p, hlen);
ip_output_if(p, &(iphdr->src), IP_HDRINCL,
IPH_TTL(iphdr), 0, IP_PROTO_ICMP, inp);
IPH_TTL(iphdr), 0, IP_PROTO_ICMP, inp);
break;
default:
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %"S16_F" code %"S16_F" not supported.\n", (s16_t)type, (s16_t)code));
@@ -151,7 +151,7 @@ icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t)
snmp_inc_icmpoutdestunreachs();
ip_output(q, NULL, &(iphdr->src),
ICMP_TTL, 0, IP_PROTO_ICMP);
ICMP_TTL, 0, IP_PROTO_ICMP);
pbuf_free(q);
}
@@ -188,7 +188,7 @@ icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t)
/* increase number of destination unreachable messages attempted to send */
snmp_inc_icmpouttimeexcds();
ip_output(q, NULL, &(iphdr->src),
ICMP_TTL, 0, IP_PROTO_ICMP);
ICMP_TTL, 0, IP_PROTO_ICMP);
pbuf_free(q);
}

View File

@@ -112,8 +112,8 @@ memp_sanity(void)
for (m = memp_tab[i]; m != NULL; m = m->next) {
c = 1;
for (n = memp_tab[i]; n != NULL; n = n->next) {
if (n == m && --c < 0) {
return 0; /* LW was: abort(); */
if (n == m && --c < 0) {
return 0; /* LW was: abort(); */
}
}
}

View File

@@ -96,7 +96,7 @@ stats_display(void)
{
s16_t i;
char * memp_names[] = {"PBUF", "RAW_PCB", "UDP_PCB", "TCP_PCB", "TCP_PCB_LISTEN",
"TCP_SEG", "NETBUF", "NETCONN", "API_MSG", "TCP_MSG", "TIMEOUT"};
"TCP_SEG", "NETBUF", "NETCONN", "API_MSG", "TCP_MSG", "TIMEOUT"};
stats_display_proto(&lwip_stats.link, "LINK");
stats_display_proto(&lwip_stats.ip_frag, "IP_FRAG");
stats_display_proto(&lwip_stats.ip, "IP");
@@ -108,7 +108,7 @@ stats_display(void)
for (i = 0; i < MEMP_MAX; i++) {
stats_display_mem(&lwip_stats.memp[i], memp_names[i]);
}
}
#endif /* LWIP_STATS_DISPLAY */
#endif /* LWIP_STATS */

View File

@@ -614,8 +614,8 @@ udp_remove(struct udp_pcb *pcb)
for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) {
/* find pcb in udp_pcbs list */
if (pcb2->next != NULL && pcb2->next == pcb) {
/* remove pcb from list */
pcb2->next = pcb->next;
/* remove pcb from list */
pcb2->next = pcb->next;
}
}
memp_free(MEMP_UDP_PCB, pcb);