teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0104-json-align-table.patch

594167
From ee588179205de7c1584bd45bd22ec59028f11405 Mon Sep 17 00:00:00 2001
594167
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
594167
Date: Mon, 9 May 2022 10:24:36 +0200
594167
Subject: [PATCH] json: align table
594167
594167
(cherry picked from commit 9674b089cfb1f75653579e83735e049ddcbbed7e)
594167
Related: #2087652
594167
---
594167
 src/shared/json.c | 18 ++++++++----------
594167
 1 file changed, 8 insertions(+), 10 deletions(-)
594167
594167
diff --git a/src/shared/json.c b/src/shared/json.c
594167
index dff95eda26..6375b87a0b 100644
594167
--- a/src/shared/json.c
594167
+++ b/src/shared/json.c
594167
@@ -4754,7 +4754,6 @@ bool json_variant_is_sorted(JsonVariant *v) {
594167
 }
594167
 
594167
 int json_variant_unbase64(JsonVariant *v, void **ret, size_t *ret_size) {
594167
-
594167
         if (!json_variant_is_string(v))
594167
                 return -EINVAL;
594167
 
594167
@@ -4762,7 +4761,6 @@ int json_variant_unbase64(JsonVariant *v, void **ret, size_t *ret_size) {
594167
 }
594167
 
594167
 int json_variant_unhex(JsonVariant *v, void **ret, size_t *ret_size) {
594167
-
594167
         if (!json_variant_is_string(v))
594167
                 return -EINVAL;
594167
 
594167
@@ -4770,15 +4768,15 @@ int json_variant_unhex(JsonVariant *v, void **ret, size_t *ret_size) {
594167
 }
594167
 
594167
 static const char* const json_variant_type_table[_JSON_VARIANT_TYPE_MAX] = {
594167
-        [JSON_VARIANT_STRING] = "string",
594167
-        [JSON_VARIANT_INTEGER] = "integer",
594167
+        [JSON_VARIANT_STRING]   = "string",
594167
+        [JSON_VARIANT_INTEGER]  = "integer",
594167
         [JSON_VARIANT_UNSIGNED] = "unsigned",
594167
-        [JSON_VARIANT_REAL] = "real",
594167
-        [JSON_VARIANT_NUMBER] = "number",
594167
-        [JSON_VARIANT_BOOLEAN] = "boolean",
594167
-        [JSON_VARIANT_ARRAY] = "array",
594167
-        [JSON_VARIANT_OBJECT] = "object",
594167
-        [JSON_VARIANT_NULL] = "null",
594167
+        [JSON_VARIANT_REAL]     = "real",
594167
+        [JSON_VARIANT_NUMBER]   = "number",
594167
+        [JSON_VARIANT_BOOLEAN]  = "boolean",
594167
+        [JSON_VARIANT_ARRAY]    = "array",
594167
+        [JSON_VARIANT_OBJECT]   = "object",
594167
+        [JSON_VARIANT_NULL]     = "null",
594167
 };
594167
 
594167
 DEFINE_STRING_TABLE_LOOKUP(json_variant_type, JsonVariantType);