batman-adv: Calculate sizeof using variable insead of types
authorSven Eckelmann <sven@narfation.org>
Sat, 14 May 2011 21:14:54 +0000 (23:14 +0200)
committerSven Eckelmann <sven@narfation.org>
Mon, 30 May 2011 05:39:33 +0000 (07:39 +0200)
commit704509b8d44886cebfbaff1a9813c35dfa986954
tree7b353f1d4a33b31d55d2a85f8d70882ade1868ce
parent958ca5985604a6f13387d32de489365df816558b
batman-adv: Calculate sizeof using variable insead of types

Documentation/CodingStyle recommends to use the form

p = kmalloc(sizeof(*p), ...);

to calculate the size of a struct and not the version where the struct
name is spelled out to prevent bugs when the type of p changes. This
also seems appropriate for manipulation of buffers when they are
directly associated with p.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
14 files changed:
net/batman-adv/aggregation.c
net/batman-adv/bat_debugfs.c
net/batman-adv/gateway_client.c
net/batman-adv/hard-interface.c
net/batman-adv/hash.c
net/batman-adv/icmp_socket.c
net/batman-adv/originator.c
net/batman-adv/routing.c
net/batman-adv/send.c
net/batman-adv/soft-interface.c
net/batman-adv/translation-table.c
net/batman-adv/unicast.c
net/batman-adv/unicast.h
net/batman-adv/vis.c