summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-02-09 17:08:06 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-02-10 14:43:10 +0100
commit4d24463211cf3643a5c1a0ae4743f555408f49a8 (patch)
tree492d3f05242be06b98ae36d3f8ffa7675c6e206d
parentsd-event: drop one bitfield from sd_event_source (diff)
downloadsystemd-4d24463211cf3643a5c1a0ae4743f555408f49a8.tar.xz
systemd-4d24463211cf3643a5c1a0ae4743f555408f49a8.zip
shared/json: make JsonVariant.type field wider
pahole shows that this doesn't make a difference, but we can fit -EINVAL into .type without warnings.
-rw-r--r--src/shared/json.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shared/json.c b/src/shared/json.c
index fe32212993..b8f8292e74 100644
--- a/src/shared/json.c
+++ b/src/shared/json.c
@@ -64,7 +64,10 @@ struct JsonVariant {
JsonSource *source;
unsigned line, column;
- JsonVariantType type:5;
+ /* The current 'depth' of the JsonVariant, i.e. how many levels of member variants this has */
+ uint16_t depth;
+
+ JsonVariantType type:8;
/* A marker whether this variant is embedded into in array/object or not. If true, the 'parent' pointer above
* is valid. If false, the 'n_ref' field above is valid instead. */
@@ -87,9 +90,6 @@ struct JsonVariant {
/* If in addition to this object all objects referenced by it are also ordered strictly by name */
bool normalized:1;
- /* The current 'depth' of the JsonVariant, i.e. how many levels of member variants this has */
- uint16_t depth;
-
union {
/* For simple types we store the value in-line. */
JsonValue value;