packetbuf: Simplified packetbuf_attr_clear
This commit is contained in:
parent
1014018c2d
commit
3d79292e44
|
@ -195,9 +195,7 @@ void
|
||||||
packetbuf_attr_clear(void)
|
packetbuf_attr_clear(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for(i = 0; i < PACKETBUF_NUM_ATTRS; ++i) {
|
memset(packetbuf_attrs, 0, sizeof(packetbuf_attrs));
|
||||||
packetbuf_attrs[i].val = 0;
|
|
||||||
}
|
|
||||||
for(i = 0; i < PACKETBUF_NUM_ADDRS; ++i) {
|
for(i = 0; i < PACKETBUF_NUM_ADDRS; ++i) {
|
||||||
linkaddr_copy(&packetbuf_addrs[i].addr, &linkaddr_null);
|
linkaddr_copy(&packetbuf_addrs[i].addr, &linkaddr_null);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue