Skip to content

Commit

Permalink
netfilter: xt_quota: Don't use aligned attribute in sizeof
Browse files Browse the repository at this point in the history
Clang warns:

net/netfilter/xt_quota.c:47:44: warning: 'aligned' attribute ignored
when parsing type [-Wignored-attributes]
        BUILD_BUG_ON(sizeof(atomic64_t) != sizeof(__aligned_u64));
                                                  ^~~~~~~~~~~~~

Use 'sizeof(__u64)' instead, as the alignment doesn't affect the size
of the type.

Fixes: e9837e5 ("netfilter: xt_quota: fix the behavior of xt_quota module")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Nathan Chancellor authored and Pablo Neira Ayuso committed Oct 8, 2018
1 parent e9837e5 commit ffa0a9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/xt_quota.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static int quota_mt_check(const struct xt_mtchk_param *par)
{
struct xt_quota_info *q = par->matchinfo;

BUILD_BUG_ON(sizeof(atomic64_t) != sizeof(__aligned_u64));
BUILD_BUG_ON(sizeof(atomic64_t) != sizeof(__u64));

if (q->flags & ~XT_QUOTA_MASK)
return -EINVAL;
Expand Down

0 comments on commit ffa0a9a

Please sign in to comment.