Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lsm: rename variable to avoid shadowing

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>

authored by

Christian Göttsche and committed by
Paul Moore
b00083ae b0966c7c

+2 -2
+2 -2
security/lsm_audit.c
··· 299 299 if (tsk) { 300 300 pid_t pid = task_tgid_nr(tsk); 301 301 if (pid) { 302 - char comm[sizeof(tsk->comm)]; 302 + char tskcomm[sizeof(tsk->comm)]; 303 303 audit_log_format(ab, " opid=%d ocomm=", pid); 304 304 audit_log_untrustedstring(ab, 305 - get_task_comm(comm, tsk)); 305 + get_task_comm(tskcomm, tsk)); 306 306 } 307 307 } 308 308 break;