]> Git Repo - linux.git/commitdiff
audit: uninitialize variable audit_sig_sid
authorJules Irenge <[email protected]>
Mon, 3 Aug 2020 12:34:39 +0000 (13:34 +0100)
committerPaul Moore <[email protected]>
Tue, 18 Aug 2020 00:28:17 +0000 (20:28 -0400)
Checkpatch tool reports

"ERROR: do not initialise globals/statics to 0"

To fix this, audit_sig_sid is uninitialized
As this is stored in the .bss section,
the compiler can initialize the variable automatically.

Signed-off-by: Jules Irenge <[email protected]>
Signed-off-by: Paul Moore <[email protected]>
kernel/audit.c

index 5cf4781d55468df5b681e6edf22a47b09a189d33..86f2b76e3d4e332e2de32f877878ae2d39260f12 100644 (file)
@@ -125,7 +125,7 @@ static u32  audit_backlog_wait_time = AUDIT_BACKLOG_WAIT_TIME;
 /* The identity of the user shutting down the audit system. */
 static kuid_t          audit_sig_uid = INVALID_UID;
 static pid_t           audit_sig_pid = -1;
-static u32             audit_sig_sid = 0;
+static u32             audit_sig_sid;
 
 /* Records can be lost in several ways:
    0) [suppressed in audit_alloc]
This page took 0.055643 seconds and 4 git commands to generate.