]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: move variables to innermost scope
authorLennart Poettering <lennart@poettering.net>
Mon, 10 May 2021 15:47:19 +0000 (17:47 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 11 May 2021 13:42:46 +0000 (15:42 +0200)
src/core/cgroup.c

index 961f112eb259a3081226afb0a7c6bed751cf80f6..15b84dea0629c4fd74ca3ea97f865e5920e6a756 100644 (file)
@@ -203,12 +203,10 @@ void cgroup_context_remove_bpf_foreign_program(CGroupContext *c, CGroupBPFForeig
 }
 
 void cgroup_context_remove_socket_bind(CGroupSocketBindItem **head) {
-        CGroupSocketBindItem *h;
-
         assert(head);
 
         while (*head) {
-                h = *head;
+                CGroupSocketBindItem *h = *head;
                 LIST_REMOVE(socket_bind_items, *head, h);
                 free(h);
         }