]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
src/systemd.c: fix coding style complaint
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Fri, 11 Aug 2023 06:55:04 +0000 (12:25 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Fri, 11 Aug 2023 17:37:54 +0000 (11:37 -0600)
Fix the checkpatch.pl warnings, making it coding style complaint.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/systemd.c

index 642fc29e2b5f96be7dbcd125114650a8950a2918..2fab7cccf33fbfda9b1a7d8cab19d8199c0767a7 100644 (file)
@@ -124,7 +124,7 @@ int cgroup_create_scope(const char * const scope_name, const char * const slice_
                }
 
                if (child_pid == 0) {
-                       char *args[] = {"libcgroup_systemd_idle_thread", NULL};
+                       static char * const args[] = {"libcgroup_systemd_idle_thread", NULL};
 
                        /*
                         * Have the child sleep forever.  Systemd will delete the scope if
@@ -241,7 +241,7 @@ int cgroup_create_scope(const char * const scope_name, const char * const slice_
        }
 
        /* The callback will null out the job_path pointer on completion */
-       while(job_path) {
+       while (job_path) {
                sdret = sd_bus_process(bus, NULL);
                if (sdret < 0) {
                        cgroup_err("failed to process the sd bus: %d\n", errno);