]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
netfilter: nf_tables: constify struct nft_ctx * parameter in nft_trans_alloc()
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 5 Dec 2016 22:35:48 +0000 (23:35 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 7 Dec 2016 12:22:51 +0000 (13:22 +0100)
Context is not modified by nft_trans_alloc(), so constify it.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c

index b04d4ee1d5331d1d72535c5c6ebf903ffd0a2c6b..b42059795819ab8ef6012992bfbe8d1700e45a76 100644 (file)
@@ -111,8 +111,8 @@ static void nft_ctx_init(struct nft_ctx *ctx,
        ctx->seq        = nlh->nlmsg_seq;
 }
 
-static struct nft_trans *nft_trans_alloc(struct nft_ctx *ctx, int msg_type,
-                                        u32 size)
+static struct nft_trans *nft_trans_alloc(const struct nft_ctx *ctx,
+                                        int msg_type, u32 size)
 {
        struct nft_trans *trans;