projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
599ece4
)
Bluetooth: 6lowpan: No need to clear memory twice
author
Christophe JAILLET
<christophe.jaillet@wanadoo.fr>
Sun, 13 Feb 2022 21:30:47 +0000
(22:30 +0100)
committer
Marcel Holtmann
<marcel@holtmann.org>
Fri, 4 Mar 2022 15:10:49 +0000
(16:10 +0100)
'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>
net/bluetooth/6lowpan.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/6lowpan.c
b/net/bluetooth/6lowpan.c
index
133d7ea
..
8e8c075
100644
(file)
--- 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);