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

index 67bdb056ef14b312f45482fcdbe7b351f97cb312..0085e2a08729e863f8a0b5c45257cf6657e14018 100644 (file)
@@ -161,12 +161,12 @@ static int process_machine(const char *machine, const char *port) {
 
         uint32_t cid = VMADDR_CID_ANY;
 
-        const sd_json_dispatch_field dispatch_table[] = {
-                { "vSockCid", SD_JSON_VARIANT_UNSIGNED, sd_json_dispatch_uint32, PTR_TO_SIZE(&cid), 0 },
+        static const sd_json_dispatch_field dispatch_table[] = {
+                { "vSockCid", SD_JSON_VARIANT_UNSIGNED, sd_json_dispatch_uint32, 0, 0 },
                 {}
         };
 
-        r = sd_json_dispatch(result, dispatch_table, SD_JSON_ALLOW_EXTENSIONS, NULL);
+        r = sd_json_dispatch(result, dispatch_table, SD_JSON_ALLOW_EXTENSIONS, &cid);
         if (r < 0)
                 return log_error_errno(r, "Failed to parse Varlink reply: %m");