diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2020-05-04 16:00:14 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2020-05-04 16:00:14 +0000 |
commit | a726b9dee3ed0560649f6a6801527c3d3491af47 (patch) | |
tree | f2f2c24afc6d6f387c55792536a492a133eb9d88 | |
parent | 8b470fc49144d2c16d7f5bd5f3351e1b16a11c45 (diff) |
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@
-rw-r--r-- | usr.sbin/bgpctl/json.c | 4 | ||||
-rw-r--r-- | usr.sbin/bgpctl/json.h | 4 |
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); |