diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-06-18 21:23:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-18 21:23:49 +0200 |
commit | 6f32955ec309b050906d1ed8006a4cae74118c74 (patch) | |
tree | 3456464943734719b9b1ede98857397cf5502ef7 /babeld | |
parent | Merge pull request #2489 from pacovn/cppcheck_reduntant_pointer_op (diff) | |
parent | babeld, lib, ospfd, tests: fmt fixes (cppcheck) (diff) | |
download | frr-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.c | 2 | ||||
-rw-r--r-- | babeld/util.c | 2 |
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]; } |