Commit 35b7ee34 authored by Andrew Lunn's avatar Andrew Lunn Committed by Pablo Neira Ayuso
Browse files

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: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 3976ca10
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;