Skip to content

Commit b00083a

Browse files
cgzonespcmoore
authored andcommitted
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 <[email protected]> [PM: description long line removal, line wrap cleanup, merge fuzz] Signed-off-by: Paul Moore <[email protected]>
1 parent b0966c7 commit b00083a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

security/lsm_audit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,10 @@ static void dump_common_audit_data(struct audit_buffer *ab,
299299
if (tsk) {
300300
pid_t pid = task_tgid_nr(tsk);
301301
if (pid) {
302-
char comm[sizeof(tsk->comm)];
302+
char tskcomm[sizeof(tsk->comm)];
303303
audit_log_format(ab, " opid=%d ocomm=", pid);
304304
audit_log_untrustedstring(ab,
305-
get_task_comm(comm, tsk));
305+
get_task_comm(tskcomm, tsk));
306306
}
307307
}
308308
break;

0 commit comments

Comments
 (0)