On Mon, 2016-02-29 at 17:23 +0530, Nishant Chaprana wrote:
---
tools/addr-test.c | 2 +-
tools/stats-tool.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/addr-test.c b/tools/addr-test.c
index 273ab02..5d53fa7 100644
--- a/tools/addr-test.c
+++ b/tools/addr-test.c
@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
for (i = 0; i < 4; i++) {
len = (i + 1) * 8;
addr.s_addr = htonl(~(0xfffffffflu >> len));
- printf("prefixlen %-2u netmask %s\n", len, inet_ntoa(addr));
+ printf("prefixlen %-2d netmask %s\n", len, inet_ntoa(addr));
}
return 0;
diff --git a/tools/stats-tool.c b/tools/stats-tool.c
index b076478..f773413 100644
--- a/tools/stats-tool.c
+++ b/tools/stats-tool.c
@@ -277,9 +277,9 @@ static void stats_hdr_info(struct stats_file *file)
get_index(file, begin), hdr->begin);
printf(" end [%d] 0x%08x\n",
get_index(file, end), hdr->end);
- printf(" home [%d] 0x%08x\n",
+ printf(" home [%u] 0x%08x\n",
home_idx, hdr->home);
- printf(" roaming [%d] 0x%08x\n\n",
+ printf(" roaming [%u] 0x%08x\n\n",
roaming_idx, hdr->roaming);
There is some additional confusion in the tools code. roaming_idx and
home_idx are unsigned ints, but get_index() is returning an int so
something more needs fixing.
Patrik