Skip to content

Commit

Permalink
[TCP] tcp_probe: Attach printf attribute properly to printl().
Browse files Browse the repository at this point in the history
GCC doesn't like the way Stephen initially did it:

net/ipv4/tcp_probe.c:83: warning: empty declaration

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jun 7, 2007
1 parent 274707c commit 14a49e1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/ipv4/tcp_probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ struct {
* Print to log with timestamps.
* FIXME: causes an extra copy
*/
static void printl(const char *fmt, ...)
__attribute__ ((format (printf, 1, 2)));

static void printl(const char *fmt, ...)
{
va_list args;
Expand All @@ -80,8 +83,7 @@ static void printl(const char *fmt, ...)

kfifo_put(tcpw.fifo, tbuf, len);
wake_up(&tcpw.wait);
} __attribute__ ((format (printf, 1, 2)));

}

/*
* Hook inserted to be called before each receive packet.
Expand Down

0 comments on commit 14a49e1

Please sign in to comment.