summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bgpctl
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2020-05-04 16:00:13 +0000
committerclaudio <claudio@openbsd.org>2020-05-04 16:00:13 +0000
commitdf3045ca80946421894a043ff89b86049b9d9e0c (patch)
treec2c2ac25590e2e9c1c2ed2f5e0d0e932564868ca /usr.sbin/bgpctl
parentleave -beta. (diff)
downloadwireguard-openbsd-df3045ca80946421894a043ff89b86049b9d9e0c.tar.xz
wireguard-openbsd-df3045ca80946421894a043ff89b86049b9d9e0c.zip
Using int64_t together with printf %llu is not portable. Either add a
cast in the printf to unsigned long long or just use unsigned long long from the start. In this case it is better to switch the type. Similar changes had been done before. OK deraadt@
Diffstat (limited to 'usr.sbin/bgpctl')
-rw-r--r--usr.sbin/bgpctl/json.c4
-rw-r--r--usr.sbin/bgpctl/json.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/bgpctl/json.c b/usr.sbin/bgpctl/json.c
index 106fd2f7729..f2dc30ba997 100644
--- a/usr.sbin/bgpctl/json.c
+++ b/usr.sbin/bgpctl/json.c
@@ -200,7 +200,7 @@ json_do_bool(const char *name, int v)
}
void
-json_do_uint(const char *name, uint64_t v)
+json_do_uint(const char *name, unsigned long long v)
{
do_comma_indent();
do_name(name);
@@ -208,7 +208,7 @@ json_do_uint(const char *name, uint64_t v)
}
void
-json_do_int(const char *name, int64_t v)
+json_do_int(const char *name, long long v)
{
do_comma_indent();
do_name(name);
diff --git a/usr.sbin/bgpctl/json.h b/usr.sbin/bgpctl/json.h
index ec9d0adbfa5..59a645f6f19 100644
--- a/usr.sbin/bgpctl/json.h
+++ b/usr.sbin/bgpctl/json.h
@@ -26,6 +26,6 @@ void json_do_printf(const char *, const char *, ...)
__attribute__((__format__ (printf, 2, 3)));
void json_do_hexdump(const char *, void *, size_t);
void json_do_bool(const char *, int);
-void json_do_uint(const char *, uint64_t);
-void json_do_int(const char *, int64_t);
+void json_do_uint(const char *, unsigned long long);
+void json_do_int(const char *, long long);
void json_do_double(const char *, double);