[PATCH] net/netvsc: fix bogus sizeof calculation

Ferruh Yigit ferruh.yigit at amd.com
Thu Jun 29 13:13:23 CEST 2023


On 6/29/2023 1:29 AM, longli at linuxonhyperv.com wrote:
> From: Stephen Hemminger <stephen at networkplumber.org>
> 
> Found by cppcheck.
> 
> drivers/net/netvsc/hn_rndis.c:332:21: warning: Found calculation inside sizeof(). [sizeofCalculation]  if (len < sizeof(3 * sizeof(uint32_t))) {
> 
> Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> Signed-off-by: Long Li <longli at microsoft.com>
>

Applied to dpdk-next-net/main, thanks.



More information about the dev mailing list