All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven.eckelmann@gmx.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH 1/6] batctl: Correct format strings for 8 bit ttl
Date: Sat, 30 Oct 2010 17:00:53 +0200	[thread overview]
Message-ID: <1288450858-14753-1-git-send-email-sven.eckelmann@gmx.de> (raw)

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
---
 batctl/tcpdump.c    |    4 ++--
 batctl/traceroute.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/batctl/tcpdump.c b/batctl/tcpdump.c
index 0f62e65..8898cf8 100644
--- a/batctl/tcpdump.c
+++ b/batctl/tcpdump.c
@@ -335,7 +335,7 @@ static void dump_batman_ucast(unsigned char *packet_buff, ssize_t buff_len, int
 	printf("BAT %s > ",
 	       get_name_by_macaddr((struct ether_addr *)ether_header->ether_shost, read_opt));
 
-	printf("%s: UCAST, ttl %hu, ",
+	printf("%s: UCAST, ttl %hhu, ",
 	       get_name_by_macaddr((struct ether_addr *)unicast_packet->dest, read_opt),
 	       unicast_packet->ttl);
 
@@ -388,7 +388,7 @@ static void dump_batman_frag(unsigned char *packet_buff, ssize_t buff_len, int r
 	printf("BAT %s > ",
 	       get_name_by_macaddr((struct ether_addr *)unicast_frag_packet->orig, read_opt));
 
-	printf("%s: FRAG, seq %hu, ttl %hu, flags [%c], ",
+	printf("%s: FRAG, seq %hu, ttl %hhu, flags [%c], ",
 	       get_name_by_macaddr((struct ether_addr *)unicast_frag_packet->dest, read_opt),
 	       ntohs(unicast_frag_packet->seqno), unicast_frag_packet->ttl,
 	       (unicast_frag_packet->flags & UNI_FRAG_HEAD ? 'H' : '.'));
diff --git a/batctl/traceroute.c b/batctl/traceroute.c
index dc97a01..0dc796a 100644
--- a/batctl/traceroute.c
+++ b/batctl/traceroute.c
@@ -199,9 +199,9 @@ int traceroute(char *mesh_iface, int argc, char **argv)
 		}
 
 		if (!bat_host)
-			printf("%2hu: %s", icmp_packet_out.ttl, (return_mac ? return_mac : "*"));
+			printf("%2hhu: %s", icmp_packet_out.ttl, (return_mac ? return_mac : "*"));
 		else
-			printf("%2hu: %s (%s)",	icmp_packet_out.ttl, bat_host->name, return_mac);
+			printf("%2hhu: %s (%s)", icmp_packet_out.ttl, bat_host->name, return_mac);
 
 		for (i = 0; i < NUM_PACKETS; i++) {
 			if (time_delta[i])
-- 
1.7.2.3


             reply	other threads:[~2010-10-30 15:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-30 15:00 Sven Eckelmann [this message]
2010-10-30 15:00 ` [B.A.T.M.A.N.] [PATCH 2/6] batctl: Don't print uninitialised traceroute times Sven Eckelmann
2010-10-30 15:00 ` [B.A.T.M.A.N.] [PATCH 3/6] batctl: Remove unused variables Sven Eckelmann
2010-11-01 11:26   ` Marek Lindner
2010-11-01 11:34     ` Sven Eckelmann
2010-11-01 11:48   ` [B.A.T.M.A.N.] [PATCHv2 " Sven Eckelmann
2010-10-30 15:00 ` [B.A.T.M.A.N.] [PATCH 4/6] batctl: Initialise timeout before usage in error case Sven Eckelmann
2010-10-30 15:00 ` [B.A.T.M.A.N.] [PATCH 5/6] batctl: Readd ping interval after each loop Sven Eckelmann
2010-10-30 15:00 ` [B.A.T.M.A.N.] [PATCH 6/6] batctl: Convert strtok to reentrant safe strtok_r Sven Eckelmann
2010-11-04 14:05 ` [B.A.T.M.A.N.] [PATCH 1/6] batctl: Correct format strings for 8 bit ttl Marek Lindner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1288450858-14753-1-git-send-email-sven.eckelmann@gmx.de \
    --to=sven.eckelmann@gmx.de \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.