]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
json: drop redundant check
authorLennart Poettering <lennart@poettering.net>
Thu, 4 Jan 2024 14:17:19 +0000 (15:17 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 4 Jan 2024 21:55:42 +0000 (22:55 +0100)
The same check is done exactly one line later, because this is one of
the things that json_variant_is_regular() checks.

As per: https://github.com/systemd/systemd/pull/30578/commits/fa9a6db478e3f0f2753e4633af6d0d4881707c2b#r1441792019

src/shared/json.c

index 15675a7046ea84b19658ece1b68c1ad61e4f4384..19e8e0c77ef8bd8f67a28d18c260938ab7bd2568 100644 (file)
@@ -1776,9 +1776,6 @@ static bool json_variant_is_sensitive_recursive(JsonVariant *v) {
                 return false;
         if (json_variant_is_sensitive(v))
                 return true;
-        if (v == JSON_VARIANT_MAGIC_EMPTY_ARRAY ||
-            v == JSON_VARIANT_MAGIC_EMPTY_OBJECT)
-                return false;
         if (!json_variant_is_regular(v))
                 return false;
         if (!IN_SET(v->type, JSON_VARIANT_ARRAY, JSON_VARIANT_OBJECT))