mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
bridge_get_pfval: use nitems instead of spelling it out longhand
MFC after: 3 days
This commit is contained in:
parent
a0cc1855e3
commit
758268dcae
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=311291
|
@ -1449,8 +1449,8 @@ static struct {
|
|||
int32_t
|
||||
bridge_get_pfval(uint8_t which)
|
||||
{
|
||||
if (which > sizeof(bridge_pf_sysctl) / sizeof(bridge_pf_sysctl[0])
|
||||
|| which < 1)
|
||||
|
||||
if (which > nitems(bridge_pf_sysctl) || which < 1)
|
||||
return (-1);
|
||||
|
||||
return (bridge_pf_sysctl[which - 1].val);
|
||||
|
|
Loading…
Reference in a new issue