diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2022-02-13 22:30:47 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2022-03-04 16:10:49 +0100 |
commit | f1b8eea0fa662709fd8f3e32511bafeee99b10b3 (patch) | |
tree | 788f11ec51235f5a75b46d60fcfd6749d52207b7 /net/bluetooth/6lowpan.c | |
parent | 599ece4f8f073097904d411ee70280a2ec890ad3 (diff) |
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>
Diffstat (limited to 'net/bluetooth/6lowpan.c')
-rw-r--r-- | net/bluetooth/6lowpan.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c index 133d7ea063fb..8e8c07541153 100644 --- a/net/bluetooth/6lowpan.c +++ b/net/bluetooth/6lowpan.c @@ -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); |