summaryrefslogtreecommitdiff
path: root/upb
diff options
context:
space:
mode:
authorBo Yang <teboring@google.com>2019-06-14 00:25:46 +0000
committerBo Yang <teboring@google.com>2019-06-14 00:25:46 +0000
commit8e5f03f719d923331ad87661a139545cb6660fd5 (patch)
tree70d3d7ed60d9bcb2528a0caa44089d791b258c59 /upb
parentc50e849ac256c9f0f1921b626a41769a0d194bfe (diff)
Fix integer types
Diffstat (limited to 'upb')
-rw-r--r--upb/json/printer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/upb/json/printer.c b/upb/json/printer.c
index bf70d04..1bc6498 100644
--- a/upb/json/printer.c
+++ b/upb/json/printer.c
@@ -208,8 +208,8 @@ static size_t fmt_bool(bool val, char* buf, size_t length) {
return n;
}
-static size_t fmt_int32(long val, char* buf, size_t length) {
- size_t n = _upb_snprintf(buf, length, "%ld", val);
+static size_t fmt_int32(long long val, char* buf, size_t length) {
+ size_t n = _upb_snprintf(buf, length, "%lld", val);
CHKLENGTH(n > 0 && n < length);
return n;
}
@@ -220,8 +220,8 @@ static size_t fmt_uint32(unsigned long long val, char* buf, size_t length) {
return n;
}
-static size_t fmt_int64(long val, char* buf, size_t length) {
- size_t n = _upb_snprintf(buf, length, "\"%ld\"", val);
+static size_t fmt_int64(long long val, char* buf, size_t length) {
+ size_t n = _upb_snprintf(buf, length, "\"%lld\"", val);
CHKLENGTH(n > 0 && n < length);
return n;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback