]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
lsm: rename variable to avoid shadowing
authorChristian Göttsche <cgzones@googlemail.com>
Mon, 25 Nov 2024 10:59:23 +0000 (11:59 +0100)
committerPaul Moore <paul@paul-moore.com>
Sun, 5 Jan 2025 03:04:39 +0000 (22:04 -0500)
The function dump_common_audit_data() contains two variables with the
name comm: one declared at the top and one nested one.  Rename the
nested variable to improve readability and make future refactorings
of the function less error prone.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
[PM: description long line removal, line wrap cleanup, merge fuzz]
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/lsm_audit.c

index 8df6f77a7526b68966d8457a3d3ed8224f85f057..54a7b62ca0307bdb516b1634e0a20345db12fb42 100644 (file)
@@ -299,10 +299,10 @@ static void dump_common_audit_data(struct audit_buffer *ab,
                if (tsk) {
                        pid_t pid = task_tgid_nr(tsk);
                        if (pid) {
-                               char comm[sizeof(tsk->comm)];
+                               char tskcomm[sizeof(tsk->comm)];
                                audit_log_format(ab, " opid=%d ocomm=", pid);
                                audit_log_untrustedstring(ab,
-                                   get_task_comm(comm, tsk));
+                                   get_task_comm(tskcomm, tsk));
                        }
                }
                break;