* [PATCH] [TCP] tcp_probe: a trivial fix for mismatched number of printl arguments.
@ 2007-05-21 7:45 Sangtae Ha
2007-05-21 16:00 ` Stephen Hemminger
2007-05-21 16:02 ` [PATCH] tcp_probe: use GCC printf attribute Stephen Hemminger
0 siblings, 2 replies; 3+ messages in thread
From: Sangtae Ha @ 2007-05-21 7:45 UTC (permalink / raw)
To: davem; +Cc: netdev, Sangtae Ha
Just a fix to correct the number of printl arguments. Now, srtt is logging correctly.
Signed-off-by: Sangtae Ha <sangtae.ha@gmail.com>
---
net/ipv4/tcp_probe.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c
index 3938d5d..1b72c55 100644
--- a/net/ipv4/tcp_probe.c
+++ b/net/ipv4/tcp_probe.c
@@ -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,
--
1.5.0.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] [TCP] tcp_probe: a trivial fix for mismatched number of printl arguments.
2007-05-21 7:45 [PATCH] [TCP] tcp_probe: a trivial fix for mismatched number of printl arguments Sangtae Ha
@ 2007-05-21 16:00 ` Stephen Hemminger
2007-05-21 16:02 ` [PATCH] tcp_probe: use GCC printf attribute Stephen Hemminger
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2007-05-21 16:00 UTC (permalink / raw)
To: Sangtae Ha; +Cc: davem, netdev, Sangtae Ha
On Mon, 21 May 2007 03:45:42 -0400
Sangtae Ha <sangtae.ha@gmail.com> wrote:
> Just a fix to correct the number of printl arguments. Now, srtt is logging correctly.
>
> Signed-off-by: Sangtae Ha <sangtae.ha@gmail.com>
> ---
> net/ipv4/tcp_probe.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c
> index 3938d5d..1b72c55 100644
> --- a/net/ipv4/tcp_probe.c
> +++ b/net/ipv4/tcp_probe.c
> @@ -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
--
Stephen Hemminger <shemminger@linux-foundation.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tcp_probe: use GCC printf attribute
2007-05-21 7:45 [PATCH] [TCP] tcp_probe: a trivial fix for mismatched number of printl arguments Sangtae Ha
2007-05-21 16:00 ` Stephen Hemminger
@ 2007-05-21 16:02 ` Stephen Hemminger
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2007-05-21 16:02 UTC (permalink / raw)
To: Sangtae Ha, davem; +Cc: netdev, Sangtae Ha
The function in tcp_probe is printf like, use GCC to check the args.
Sighed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
---
net/ipv4/tcp_probe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/net/ipv4/tcp_probe.c 2007-05-21 08:48:29.000000000 -0700
+++ b/net/ipv4/tcp_probe.c 2007-05-21 08:50:32.000000000 -0700
@@ -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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-05-21 16:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-21 7:45 [PATCH] [TCP] tcp_probe: a trivial fix for mismatched number of printl arguments Sangtae Ha
2007-05-21 16:00 ` Stephen Hemminger
2007-05-21 16:02 ` [PATCH] tcp_probe: use GCC printf attribute Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).