tipc: Use struct_size() helper
authorGustavo A. R. Silva <gustavoars@kernel.org>
Thu, 18 Jun 2020 13:35:00 +0000 (08:35 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 20 Jun 2020 03:15:25 +0000 (20:15 -0700)
commite034c6d23bc43266af1fa983212218f4aa38f995
tree52849a855bc441927425cc3b8188c30b57edc31c
parent70fc6d9c14e24f9efae968589e5edf584a788e23
tipc: Use struct_size() helper

Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes.

This code was detected with the help of Coccinelle and, audited and
fixed manually.

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/link.c
net/tipc/msg.h