]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
varlinkctl: make sd_json_dispatch_field table static
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 18 Sep 2024 16:06:59 +0000 (01:06 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 18 Sep 2024 16:34:56 +0000 (01:34 +0900)
src/varlinkctl/varlinkctl.c

index 481a41208ef8995fba4517649c85967fdce6a29a..662a6add4b4b8ded4f97da2fb7fb2b3071cc03b7 100644 (file)
@@ -380,12 +380,12 @@ static int verb_introspect(int argc, char *argv[], void *userdata) {
                 if (r < 0)
                         return r;
 
-                const struct sd_json_dispatch_field dispatch_table[] = {
-                        { "interfaces", SD_JSON_VARIANT_ARRAY, sd_json_dispatch_strv, PTR_TO_SIZE(&auto_interfaces), SD_JSON_MANDATORY },
+                static const sd_json_dispatch_field dispatch_table[] = {
+                        { "interfaces", SD_JSON_VARIANT_ARRAY, sd_json_dispatch_strv, 0, SD_JSON_MANDATORY },
                         {}
                 };
 
-                r = sd_json_dispatch(reply, dispatch_table, SD_JSON_LOG|SD_JSON_ALLOW_EXTENSIONS, NULL);
+                r = sd_json_dispatch(reply, dispatch_table, SD_JSON_LOG|SD_JSON_ALLOW_EXTENSIONS, &auto_interfaces);
                 if (r < 0)
                         return r;