mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-06 14:05:39 +00:00
Bluetooth: 6lowpan: No need to clear memory twice
'peer_addr' is a structure embedded in 'struct lowpan_peer'. So there is no need to explicitly call memset(0) on it. It is already zeroed by kzalloc() when 'peer' is allocated. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
599ece4f8f
commit
f1b8eea0fa
@ -641,7 +641,6 @@ static struct l2cap_chan *add_peer_chan(struct l2cap_chan *chan,
|
||||
return NULL;
|
||||
|
||||
peer->chan = chan;
|
||||
memset(&peer->peer_addr, 0, sizeof(struct in6_addr));
|
||||
|
||||
baswap((void *)peer->lladdr, &chan->dst);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user