]> git.baikalelectronics.ru Git - kernel.git/commit
net: llc: drop VLA in llc_sap_mcast()
authorSalvatore Mesoraca <s.mesoraca16@gmail.com>
Sun, 11 Mar 2018 21:12:04 +0000 (22:12 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Mar 2018 15:14:06 +0000 (11:14 -0400)
commit21dfa53ccbce012b2a3a91b5546ed18afc596a0d
treef10b13a12ad1ea7f4790a6fa3ec6a064d22c7208
parent000dcfcf8baec9167719860aaf1ec09d1a968302
net: llc: drop VLA in llc_sap_mcast()

Avoid a VLA[1] by using a real constant expression instead of a variable.
The compiler should be able to optimize the original code and avoid using
an actual VLA. Anyway this change is useful because it will avoid a false
positive with -Wvla, it might also help the compiler generating better
code.

[1] https://lkml.org/lkml/2018/3/7/621

Signed-off-by: Salvatore Mesoraca <s.mesoraca16@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/llc/llc_sap.c