Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31ba191b authored by zhong jiang's avatar zhong jiang Committed by David S. Miller
Browse files

include/net/bond_3ad: Simplify the code by using the ARRAY_SIZE



We prefer to ARRAY_SIZE rather than the open code to calculate size.

Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bf37afce
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -283,7 +283,7 @@ static inline const char *bond_3ad_churn_desc(churn_state_t state)
		"none",
		"unknown"
	};
	int max_size = sizeof(churn_description) / sizeof(churn_description[0]);
	int max_size = ARRAY_SIZE(churn_description);

	if (state >= max_size)
		state = max_size - 1;