audit: uninitialize variable audit_sig_sid
authorJules Irenge <jbi.octave@gmail.com>
Mon, 3 Aug 2020 12:34:39 +0000 (13:34 +0100)
committerPaul Moore <paul@paul-moore.com>
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 <jbi.octave@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
kernel/audit.c

index 5cf4781..86f2b76 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]