浏览代码

[TCP] tcp_probe: use GCC printf attribute

The function in tcp_probe is printf like, use GCC to check the args.

Sighed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger 18 年之前
父节点
当前提交
67403754bc
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      net/ipv4/tcp_probe.c

+ 2 - 1
net/ipv4/tcp_probe.c

@@ -80,7 +80,8 @@ static void printl(const char *fmt, ...)
 
 
 	kfifo_put(tcpw.fifo, tbuf, len);
 	kfifo_put(tcpw.fifo, tbuf, len);
 	wake_up(&tcpw.wait);
 	wake_up(&tcpw.wait);
-}
+} __attribute__ ((format (printf, 1, 2)));
+
 
 
 /*
 /*
  * Hook inserted to be called before each receive packet.
  * Hook inserted to be called before each receive packet.