tree-wide: port over to new builder apis
This commit is contained in:
@@ -1726,13 +1726,13 @@ int dns_scope_dump_cache_to_json(DnsScope *scope, sd_json_variant **ret) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
return sd_json_build(ret,
|
||||
SD_JSON_BUILD_OBJECT(
|
||||
SD_JSON_BUILD_PAIR_STRING("protocol", dns_protocol_to_string(scope->protocol)),
|
||||
SD_JSON_BUILD_PAIR_CONDITION(scope->family != AF_UNSPEC, "family", SD_JSON_BUILD_INTEGER(scope->family)),
|
||||
SD_JSON_BUILD_PAIR_CONDITION(!!scope->link, "ifindex", SD_JSON_BUILD_INTEGER(scope->link ? scope->link->ifindex : 0)),
|
||||
SD_JSON_BUILD_PAIR_CONDITION(!!scope->link, "ifname", SD_JSON_BUILD_STRING(scope->link ? scope->link->ifname : NULL)),
|
||||
SD_JSON_BUILD_PAIR_VARIANT("cache", cache)));
|
||||
return sd_json_buildo(
|
||||
ret,
|
||||
SD_JSON_BUILD_PAIR_STRING("protocol", dns_protocol_to_string(scope->protocol)),
|
||||
SD_JSON_BUILD_PAIR_CONDITION(scope->family != AF_UNSPEC, "family", SD_JSON_BUILD_INTEGER(scope->family)),
|
||||
SD_JSON_BUILD_PAIR_CONDITION(!!scope->link, "ifindex", SD_JSON_BUILD_INTEGER(scope->link ? scope->link->ifindex : 0)),
|
||||
SD_JSON_BUILD_PAIR_CONDITION(!!scope->link, "ifname", SD_JSON_BUILD_STRING(scope->link ? scope->link->ifname : NULL)),
|
||||
SD_JSON_BUILD_PAIR_VARIANT("cache", cache));
|
||||
}
|
||||
|
||||
int dns_type_suitable_for_protocol(uint16_t type, DnsProtocol protocol) {
|
||||
|
||||
Reference in New Issue
Block a user