more "const" fixes

This commit is contained in:
goldsimon
2015-04-23 09:59:15 +02:00
parent 89f0e45b50
commit f01dc8cc34
5 changed files with 22 additions and 22 deletions

View File

@@ -260,7 +260,7 @@ ip6_2_ip(const ip6_addr_t *ip6addr, ip_addr_t* storage)
return NULL;
}
ip6_addr_copy(storage->addr.ip6, *ip6addr);
IP_SET_TYPE_L(storage, IPADDR_TYPE_V6);
IP_SET_TYPE_VAL(*storage, IPADDR_TYPE_V6);
return storage;
}
@@ -280,20 +280,20 @@ ipaddr_aton(const char *cp, ip_addr_t *addr)
if (*c == '.') {
/* contains a dot: IPv4 address */
if (addr) {
IP_SET_TYPE_L(addr, IPADDR_TYPE_V4);
IP_SET_TYPE_VAL(*addr, IPADDR_TYPE_V4);
}
return ip4addr_aton(cp, ip_2_ip4(addr));
} else if (*c == ':') {
/* contains a colon: IPv6 address */
if (addr) {
IP_SET_TYPE_L(addr, IPADDR_TYPE_V6);
IP_SET_TYPE_VAL(*addr, IPADDR_TYPE_V6);
}
return ip6addr_aton(cp, ip_2_ip6(addr));
}
}
/* nothing found, call ip4addr_aton as fallback */
if (addr) {
IP_SET_TYPE_L(addr, IPADDR_TYPE_V4);
IP_SET_TYPE_VAL(*addr, IPADDR_TYPE_V4);
}
return ip4addr_aton(cp, ip_2_ip4(addr));
}

View File

@@ -527,7 +527,7 @@ mld6_send(struct mld_group *group, u8_t type)
{
struct mld_header * mld_hdr;
struct pbuf * p;
ip6_addr_t * src_addr;
const ip6_addr_t * src_addr;
/* Allocate a packet. Size is MLD header + IPv6 Hop-by-hop options header. */
p = pbuf_alloc(PBUF_IP, sizeof(struct mld_header) + sizeof(struct ip6_hbh_hdr), PBUF_RAM);