Re: [PATCH 5/9] use %u for unsigned printfs

2008-01-12 Thread David Miller
From: Stephen Hemminger <[EMAIL PROTECTED]>
Date: Fri, 11 Jan 2008 22:45:18 -0800

> Use %u instead of %d when printing unsigned values.
> 
> Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/9] use %u for unsigned printfs

2008-01-11 Thread Stephen Hemminger
Use %u instead of %d when printing unsigned values.

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>


--- a/net/ipv4/fib_trie.c   2008-01-11 22:30:36.0 -0800
+++ b/net/ipv4/fib_trie.c   2008-01-11 22:30:46.0 -0800
@@ -2100,13 +2100,13 @@ static void trie_show_stats(struct seq_f
else
avdepth = 0;
 
-   seq_printf(seq, "\tAver depth: %d.%02d\n", avdepth / 100, avdepth % 
100 );
+   seq_printf(seq, "\tAver depth: %u.%02d\n", avdepth / 100, avdepth % 
100 );
seq_printf(seq, "\tMax depth:  %u\n", stat->maxdepth);
 
seq_printf(seq, "\tLeaves: %u\n", stat->leaves);
 
bytes = sizeof(struct leaf) * stat->leaves;
-   seq_printf(seq, "\tInternal nodes: %d\n\t", stat->tnodes);
+   seq_printf(seq, "\tInternal nodes: %u\n\t", stat->tnodes);
bytes += sizeof(struct tnode) * stat->tnodes;
 
max = MAX_STAT_DEPTH;
@@ -2116,15 +2116,15 @@ static void trie_show_stats(struct seq_f
pointers = 0;
for (i = 1; i <= max; i++)
if (stat->nodesizes[i] != 0) {
-   seq_printf(seq, "  %d: %d",  i, stat->nodesizes[i]);
+   seq_printf(seq, "  %u: %u",  i, stat->nodesizes[i]);
pointers += (1nullpointers);
-   seq_printf(seq, "Total size: %d  kB\n", (bytes + 1023) / 1024);
+   seq_printf(seq, "Null ptrs: %u\n", stat->nullpointers);
+   seq_printf(seq, "Total size: %u  kB\n", (bytes + 1023) / 1024);
 
 #ifdef CONFIG_IP_FIB_TRIE_STATS
seq_printf(seq, "Counters:\n-\n");
@@ -2318,7 +2318,7 @@ static inline const char *rtn_type(unsig
 
if (t < __RTN_MAX && rtn_type_names[t])
return rtn_type_names[t];
-   snprintf(buf, sizeof(buf), "type %d", t);
+   snprintf(buf, sizeof(buf), "type %u", t);
return buf;
 }
 

-- 
Stephen Hemminger <[EMAIL PROTECTED]>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html