From: Eric Dumazet Date: Thu, 1 Mar 2012 02:56:59 +0000 (+0000) Subject: netfilter: xt_LOG: add __printf() to sb_add() X-Git-Tag: firefly_0821_release~3680^2~3338^2~120^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ace30d73ef09fd5f95b24c5c1c5aa11963981494;p=firefly-linux-kernel-4.4.55.git netfilter: xt_LOG: add __printf() to sb_add() Helps to find format mismatches at compile time Suggested-by: David Laight Signed-off-by: Eric Dumazet --- diff --git a/include/net/netfilter/xt_log.h b/include/net/netfilter/xt_log.h index 0dfb34a5b53c..7e1544e8f70d 100644 --- a/include/net/netfilter/xt_log.h +++ b/include/net/netfilter/xt_log.h @@ -6,7 +6,7 @@ struct sbuff { }; static struct sbuff emergency, *emergency_ptr = &emergency; -static int sb_add(struct sbuff *m, const char *f, ...) +static __printf(2, 3) int sb_add(struct sbuff *m, const char *f, ...) { va_list args; int len;