tcp_probe: a trivial fix for mismatched number of printl arguments.
Subsystems (3)
PATCH 1/1 tcp_probe: a trivial fix for mismatched number of printl arguments.
Just a fix to correct the number of printl arguments. Now, srtt is logging correctly.
Signed-off-by Sangtae Ha <[email protected]>
--- net/ipv4/tcp_probe.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/ipv4/tcp_probe.c +1 -1
@@ -95,7 +95,7 @@ static int jtcp_rcv_established(struct sock *sk, struct sk_buff *skb,/* Only update if port matches */ if ((port ==0 ||ntohs (inet->dport) == port ||ntohs (inet->sport) == port) && (full || tp->snd_cwnd != tcpw.lastcwnd)) { - printl("%d.%d.%d.%d:%u %d.%d.%d.%d:%u %d %#x %#x %u %u %u\n", + printl("%d.%d.%d.%d:%u %d.%d.%d.%d:%u %d %#x %#x %u %u %u %u\n", NIPQUAD(inet->saddr), ntohs(inet->sport), NIPQUAD(inet->daddr), ntohs(inet->dport), skb->len, tp->snd_nxt, tp->snd_una,
Signature · 1 line
1.5.0.6
Quoted 12 lines · On Mon, 21 May 2007 03:45:42 -0400 Sangtae Ha <[email protected]> wrote:
Just a fix to correct the number of printl arguments. Now, srtt is logging correctly.
Signed-off-by Sangtae Ha <[email protected]>--- net/ipv4/tcp_probe.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)net/ipv4/tcp_probe.c +0
-0
net/ipv4/tcp_probe.c static int jtcp_rcv_established(struct sock *sk, struct sk_buff *skb, · line 101
Quoted 8 lines
net/ipv4/tcp_probe.c +1
-1@@ -95,7 +95,7 @@ static int jtcp_rcv_established(struct sock *sk, struct sk_buff *skb,/* Only update if port matches */ if ((port ==0 ||ntohs (inet->dport) == port ||ntohs (inet->sport) == port) && (full || tp->snd_cwnd != tcpw.lastcwnd)) { - printl("%d.%d.%d.%d:%u %d.%d.%d.%d:%u %d %#x %#x %u %u %u\n", + printl("%d.%d.%d.%d:%u %d.%d.%d.%d:%u %d %#x %#x %u %u %u %u\n", NIPQUAD(inet->saddr), ntohs(inet->sport), NIPQUAD(inet->daddr), ntohs(inet->dport), skb->len, tp->snd_nxt, tp->snd_una,
Looks good thanks
Signature · 1 line
Stephen Hemminger <[email protected]>
Re: [PATCH] tcp_probe: use GCC printf attribute
In reply to Sangtae HaThe function in tcp_probe is printf like, use GCC to check the args.
Sighed-off-by Stephen Hemminger <[email protected]>
--- net/ipv4/tcp_probe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/ipv4/tcp_probe.c +2 -1
@@ -80,7 +80,8 @@ 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.