]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: simplify variable declaration
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 9 May 2024 08:57:54 +0000 (10:57 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 22 May 2024 09:55:26 +0000 (11:55 +0200)
It doesn't matter much, but right below there is a second declaration
which already uses this style, and the mismatch was grating.

src/core/dbus-unit.c

index 20fa43af9e36122693be54c4898b6de4731e1452..5439ad52b5bd797ee802168a4a6746f57f4b5a51 100644 (file)
@@ -1370,8 +1370,7 @@ int bus_unit_method_get_processes(sd_bus_message *message, void *userdata, sd_bu
         if (r < 0)
                 return r;
 
-        CGroupRuntime *crt;
-        crt = unit_get_cgroup_runtime(u);
+        CGroupRuntime *crt = unit_get_cgroup_runtime(u);
         if (crt && crt->cgroup_path) {
                 r = append_cgroup(reply, crt->cgroup_path, pids);
                 if (r < 0)