From: Yu Watanabe Date: Sat, 16 Apr 2022 21:46:25 +0000 (+0900) Subject: json: use unsigned for refernce counter X-Git-Tag: v251-rc2~94^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6dd18b34cf53ab663140f43f8814904c71cc29f7;p=thirdparty%2Fsystemd.git json: use unsigned for refernce counter For other places, we use unsigned for reference counter. --- diff --git a/src/shared/json.c b/src/shared/json.c index dff95eda265..f66b7df24ca 100644 --- a/src/shared/json.c +++ b/src/shared/json.c @@ -41,7 +41,7 @@ assert_cc(DEPTH_MAX <= UINT16_MAX); typedef struct JsonSource { /* When we parse from a file or similar, encodes the filename, to indicate the source of a json variant */ - size_t n_ref; + unsigned n_ref; unsigned max_line; unsigned max_column; char name[]; @@ -53,7 +53,7 @@ struct JsonVariant { /* We either maintain a reference counter for this variant itself, or we are embedded into an * array/object, in which case only that surrounding object is ref-counted. (If 'embedded' is false, * see below.) */ - size_t n_ref; + unsigned n_ref; /* If this JsonVariant is part of an array/object, then this field points to the surrounding * JSON_VARIANT_ARRAY/JSON_VARIANT_OBJECT object. (If 'embedded' is true, see below.) */