]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-json: update comment regarding struct size
authorLuca Boccassi <luca.boccassi@gmail.com>
Fri, 13 Feb 2026 19:32:37 +0000 (19:32 +0000)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 27 Feb 2026 21:57:05 +0000 (21:57 +0000)
The assert at the bottom was updated when the size changed, but
the comment wasn't:

assert_cc(sizeof(sd_json_variant) == 40U);

Follow-up for 337712e777bff389f53e26d5b378d2ceba7d98a8

(cherry picked from commit 987f0fb062f02bc4c8591f03c27c5b35ddc08a65)
(cherry picked from commit c2d34aa2e461a6b7fa69bf375414883bbd736f56)
(cherry picked from commit 13164a8aa2c7dfe7a9666e93fa44cb56ae92be49)

src/libsystemd/sd-json/sd-json.c

index 8d02e4fc65b759a610aeba81cb94d0af7e4ad79e..42156fc744012d0a3a119674213f4b02edeab8f4 100644 (file)
@@ -61,7 +61,7 @@ typedef struct JsonSource {
         char name[];
 } JsonSource;
 
-/* On x86-64 this whole structure should have a size of 6 * 64 bit = 48 bytes */
+/* On x86-64 this whole structure should have a size of 5 * 64 bit = 40 bytes */
 struct sd_json_variant {
         union {
                 /* We either maintain a reference counter for this variant itself, or we are embedded into an