summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-05-15 03:26:24 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-05-15 03:26:24 +0200
commit4f6ebd43b2582603035f6631c2aede8693a06847 (patch)
treea2cd001084d58ccf2b511081018ec8a6fd9295e7 /src
parentresolve/dnssd: make dnssd_render_instance_name() take Manager (diff)
downloadsystemd-4f6ebd43b2582603035f6631c2aede8693a06847.tar.xz
systemd-4f6ebd43b2582603035f6631c2aede8693a06847.zip
resolve: merge variable declaration with same type
Diffstat (limited to 'src')
-rw-r--r--src/resolve/resolved-bus.c6
-rw-r--r--src/resolve/resolved-dnssd.c4
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);