packetbuf: Simplified packetbuf_attr_clear

This commit is contained in:
kkrentz 2016-02-03 07:59:22 -08:00
parent 1014018c2d
commit 3d79292e44

View file

@ -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);
} }