diff options
author | Jeremy Sowden <jeremy@azazel.net> | 2022-04-04 13:04:14 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2022-04-09 12:02:22 +0200 |
commit | c70b921fc1e877243f0fb495d18bb884a776b273 (patch) | |
tree | 77ca869e2a7ce34a8ab3e2501425e7054f1d2396 /net/netfilter/nft_bitwise.c | |
parent | c3e348666713bda41c76fb7f2b3606b143421dfd (diff) | |
download | linux-c70b921fc1e877243f0fb495d18bb884a776b273.tar.gz linux-c70b921fc1e877243f0fb495d18bb884a776b273.tar.bz2 linux-c70b921fc1e877243f0fb495d18bb884a776b273.zip |
netfilter: bitwise: replace hard-coded size with `sizeof` expression
When calculating the length of an array, use the appropriate `sizeof`
expression for its type, rather than an integer literal.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'net/netfilter/nft_bitwise.c')
-rw-r--r-- | net/netfilter/nft_bitwise.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nft_bitwise.c b/net/netfilter/nft_bitwise.c index 38caa66632b4..dc5759fac5b6 100644 --- a/net/netfilter/nft_bitwise.c +++ b/net/netfilter/nft_bitwise.c @@ -30,7 +30,7 @@ static void nft_bitwise_eval_bool(u32 *dst, const u32 *src, { unsigned int i; - for (i = 0; i < DIV_ROUND_UP(priv->len, 4); i++) + for (i = 0; i < DIV_ROUND_UP(priv->len, sizeof(u32)); i++) dst[i] = (src[i] & priv->mask.data[i]) ^ priv->xor.data[i]; } |