summaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2020-10-31 19:21:44 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2020-11-01 11:50:32 +0100
commit35b7ee34abdb722192635528f162ddd8cac25765 (patch)
tree010001eae3ff87e923228919fe89af40fad0ab2a /net/netfilter
parent3976ca101990ca11ddf51f38bec7b86c19d0ca6f (diff)
netfilter: nftables: Add __printf() attribute
nft_request_module calls vsnprintf() using parameters passed to it. Make the function with __printf() attribute so the compiler can check the format and arguments. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/nf_tables_api.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 65cb8e3c13d9..522a9d28754b 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -581,7 +581,8 @@ struct nft_module_request {
};
#ifdef CONFIG_MODULES
-static int nft_request_module(struct net *net, const char *fmt, ...)
+static __printf(2, 3) int nft_request_module(struct net *net, const char *fmt,
+ ...)
{
char module_name[MODULE_NAME_LEN];
struct nft_module_request *req;