Deleted Added
full compact
29c29
< __FBSDID("$FreeBSD: head/sys/netpfil/ipfw/ip_fw_table.c 272840 2014-10-09 19:32:35Z melifaro $");
---
> __FBSDID("$FreeBSD: head/sys/netpfil/ipfw/ip_fw_table.c 273274 2014-10-19 11:15:19Z melifaro $");
1491a1492,1506
> static uint32_t
> roundup2p(uint32_t v)
> {
>
> v--;
> v |= v >> 1;
> v |= v >> 2;
> v |= v >> 4;
> v |= v >> 8;
> v |= v >> 16;
> v++;
>
> return (v);
> }
>
1507a1523,1524
> if (ntables == 0)
> return (EINVAL);
1509a1527,1528
> /* Alight to nearest power of 2 */
> ntables = (unsigned int)roundup2p(ntables);