Gustavo A. R. Silva e512fcf028 net: sched: cls_u32: 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, in particular in the
context in which this code is being used.

So, replace code of the following form:

sizeof(*s) + s->nkeys*sizeof(struct tc_u32_key)

with:

struct_size(s, keys, s->nkeys)

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-04 00:46:27 -04:00
..
2019-04-19 14:07:40 -07:00
2019-04-21 10:37:26 -07:00
2019-04-27 09:07:04 -07:00
2019-04-10 12:20:46 -07:00
2019-05-01 17:15:36 -04:00
2019-04-19 14:07:40 -07:00
2019-04-19 14:07:40 -07:00