shared/json: use int64_t instead of intmax_t

We were already asserting that the intmax_t and uintmax_t types
are the same as int64_t and uint64_t. Pretty much everywhere in
the code base we use the latter types. In principle intmax_t could
be something different on some new architecture, and then the code would
fail to compile or behave differently. We actually do not want the code
to behave differently on those architectures, because that'd break
interoperability. So let's just use int64_t/uint64_t since that's what
we indend to use.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-11-18 01:34:31 +01:00
parent a810dd5c00
commit 718ca77232
15 changed files with 113 additions and 121 deletions
+2 -2
View File
@@ -133,9 +133,9 @@ static int dump_link_description(char **patterns) {
return log_oom();
JSON_VARIANT_ARRAY_FOREACH(i, json_variant_by_key(v, "Interfaces")) {
char ifindex_str[DECIMAL_STR_MAX(intmax_t)];
char ifindex_str[DECIMAL_STR_MAX(int64_t)];
const char *name;
intmax_t index;
int64_t index;
size_t pos;
name = json_variant_string(json_variant_by_key(i, "Name"));