netfilter: xt_quota: Don't use aligned attribute in sizeof
authorNathan Chancellor <natechancellor@gmail.com>
Sat, 6 Oct 2018 23:33:31 +0000 (16:33 -0700)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 8 Oct 2018 22:19:25 +0000 (00:19 +0200)
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: e9837e55b020 ("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>
net/netfilter/xt_quota.c

index 6afa7f468a73d3e4191dcd7e19a6802ed02e02fa..fceae245eb0367f2b950a3117851c7c7a162eb7e 100644 (file)
@@ -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;