summaryrefslogtreecommitdiffstats
path: root/babeld
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-06-18 21:23:49 +0200
committerGitHub <noreply@github.com>2018-06-18 21:23:49 +0200
commit6f32955ec309b050906d1ed8006a4cae74118c74 (patch)
tree3456464943734719b9b1ede98857397cf5502ef7 /babeld
parentMerge pull request #2489 from pacovn/cppcheck_reduntant_pointer_op (diff)
parentbabeld, lib, ospfd, tests: fmt fixes (cppcheck) (diff)
downloadfrr-6f32955ec309b050906d1ed8006a4cae74118c74.tar.xz
frr-6f32955ec309b050906d1ed8006a4cae74118c74.zip
Merge pull request #2486 from pacovn/cppcheck_fmt_validation
babeld, lib, ospfd, tests: fmt fixes (cppcheck)
Diffstat (limited to 'babeld')
-rw-r--r--babeld/babel_interface.c2
-rw-r--r--babeld/util.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c
index d4958ddf2..453fd8e04 100644
--- a/babeld/babel_interface.c
+++ b/babeld/babel_interface.c
@@ -1001,7 +1001,7 @@ show_babel_routes_sub(struct babel_route *route, struct vty *vty,
break;
if(k > 0)
channels[j++] = ',';
- snprintf(channels + j, 100 - j, "%d", route->channels[k]);
+ snprintf(channels + j, 100 - j, "%u", route->channels[k]);
j = strlen(channels);
}
snprintf(channels + j, 100 - j, ")");
diff --git a/babeld/util.c b/babeld/util.c
index 7dff11d12..4a3ecace0 100644
--- a/babeld/util.c
+++ b/babeld/util.c
@@ -303,7 +303,7 @@ format_thousands(unsigned int value)
static char buf[4][15];
static int i = 0;
i = (i + 1) % 4;
- snprintf(buf[i], 15, "%d.%.3d", value / 1000, value % 1000);
+ snprintf(buf[i], 15, "%u.%.3u", value / 1000, value % 1000);
return buf[i];
}