aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-01-12 23:55:55 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:01:53 -0500
commit187b5188a78694fa6608fa1252d5197a7b3ab076 (patch)
tree5367bfc196ed7753417a9b4c0f69e8fe1cb36adb /net/ipv4
parent93e4308b3bea445dc2d3e3c1897a93fe111eba17 (diff)
[IPV4] fib_trie: Use %u for unsigned printfs.
Use %u instead of %d when printing unsigned values. Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/fib_trie.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 95a62aae5f48..f5c046b517e4 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -2100,13 +2100,13 @@ static void trie_show_stats(struct seq_file *seq, struct trie_stat *stat)
2100 else 2100 else
2101 avdepth = 0; 2101 avdepth = 0;
2102 2102
2103 seq_printf(seq, "\tAver depth: %d.%02d\n", avdepth / 100, avdepth % 100 ); 2103 seq_printf(seq, "\tAver depth: %u.%02d\n", avdepth / 100, avdepth % 100 );
2104 seq_printf(seq, "\tMax depth: %u\n", stat->maxdepth); 2104 seq_printf(seq, "\tMax depth: %u\n", stat->maxdepth);
2105 2105
2106 seq_printf(seq, "\tLeaves: %u\n", stat->leaves); 2106 seq_printf(seq, "\tLeaves: %u\n", stat->leaves);
2107 2107
2108 bytes = sizeof(struct leaf) * stat->leaves; 2108 bytes = sizeof(struct leaf) * stat->leaves;
2109 seq_printf(seq, "\tInternal nodes: %d\n\t", stat->tnodes); 2109 seq_printf(seq, "\tInternal nodes: %u\n\t", stat->tnodes);
2110 bytes += sizeof(struct tnode) * stat->tnodes; 2110 bytes += sizeof(struct tnode) * stat->tnodes;
2111 2111
2112 max = MAX_STAT_DEPTH; 2112 max = MAX_STAT_DEPTH;
@@ -2116,15 +2116,15 @@ static void trie_show_stats(struct seq_file *seq, struct trie_stat *stat)
2116 pointers = 0; 2116 pointers = 0;
2117 for (i = 1; i <= max; i++) 2117 for (i = 1; i <= max; i++)
2118 if (stat->nodesizes[i] != 0) { 2118 if (stat->nodesizes[i] != 0) {
2119 seq_printf(seq, " %d: %d", i, stat->nodesizes[i]); 2119 seq_printf(seq, " %u: %u", i, stat->nodesizes[i]);
2120 pointers += (1<<i) * stat->nodesizes[i]; 2120 pointers += (1<<i) * stat->nodesizes[i];
2121 } 2121 }
2122 seq_putc(seq, '\n'); 2122 seq_putc(seq, '\n');
2123 seq_printf(seq, "\tPointers: %d\n", pointers); 2123 seq_printf(seq, "\tPointers: %u\n", pointers);
2124 2124
2125 bytes += sizeof(struct node *) * pointers; 2125 bytes += sizeof(struct node *) * pointers;
2126 seq_printf(seq, "Null ptrs: %d\n", stat->nullpointers); 2126 seq_printf(seq, "Null ptrs: %u\n", stat->nullpointers);
2127 seq_printf(seq, "Total size: %d kB\n", (bytes + 1023) / 1024); 2127 seq_printf(seq, "Total size: %u kB\n", (bytes + 1023) / 1024);
2128 2128
2129#ifdef CONFIG_IP_FIB_TRIE_STATS 2129#ifdef CONFIG_IP_FIB_TRIE_STATS
2130 seq_printf(seq, "Counters:\n---------\n"); 2130 seq_printf(seq, "Counters:\n---------\n");
@@ -2321,7 +2321,7 @@ static inline const char *rtn_type(unsigned t)
2321 2321
2322 if (t < __RTN_MAX && rtn_type_names[t]) 2322 if (t < __RTN_MAX && rtn_type_names[t])
2323 return rtn_type_names[t]; 2323 return rtn_type_names[t];
2324 snprintf(buf, sizeof(buf), "type %d", t); 2324 snprintf(buf, sizeof(buf), "type %u", t);
2325 return buf; 2325 return buf;
2326} 2326}
2327 2327