diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-05-15 03:26:24 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-05-15 03:26:24 +0200 |
commit | 4f6ebd43b2582603035f6631c2aede8693a06847 (patch) | |
tree | a2cd001084d58ccf2b511081018ec8a6fd9295e7 /src | |
parent | resolve/dnssd: make dnssd_render_instance_name() take Manager (diff) | |
download | systemd-4f6ebd43b2582603035f6631c2aede8693a06847.tar.xz systemd-4f6ebd43b2582603035f6631c2aede8693a06847.zip |
resolve: merge variable declaration with same type
Diffstat (limited to 'src')
-rw-r--r-- | src/resolve/resolved-bus.c | 6 | ||||
-rw-r--r-- | src/resolve/resolved-dnssd.c | 4 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/resolve/resolved-bus.c b/src/resolve/resolved-bus.c index ba525e30f2..8207a04196 100644 --- a/src/resolve/resolved-bus.c +++ b/src/resolve/resolved-bus.c @@ -1899,12 +1899,10 @@ static int bus_method_register_service(sd_bus_message *message, void *userdata, _cleanup_(sd_bus_creds_unrefp) sd_bus_creds *creds = NULL; _cleanup_(dnssd_service_freep) DnssdService *service = NULL; _cleanup_(sd_bus_track_unrefp) sd_bus_track *bus_track = NULL; + const char *name, *name_template, *type; _cleanup_free_ char *path = NULL; - Manager *m = userdata; DnssdService *s = NULL; - const char *name; - const char *name_template; - const char *type; + Manager *m = userdata; uid_t euid; int r; diff --git a/src/resolve/resolved-dnssd.c b/src/resolve/resolved-dnssd.c index 6ed55035b8..9c2594c1ba 100644 --- a/src/resolve/resolved-dnssd.c +++ b/src/resolve/resolved-dnssd.c @@ -207,9 +207,7 @@ int dnssd_load(Manager *manager) { } int dnssd_update_rrs(DnssdService *s) { - _cleanup_free_ char *n = NULL; - _cleanup_free_ char *service_name = NULL; - _cleanup_free_ char *full_name = NULL; + _cleanup_free_ char *n = NULL, *service_name = NULL, *full_name = NULL; int r; assert(s); |