Re: [PATCH] audit: remove redundant initialization of static variables to 0

Paul Moore <[email protected]>
Newsgroups org.kernel.vger.audit,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Feb 26, 2026 Ricardo Robaina <[email protected]> wrote:
> 
> Static variables are automatically initialized to 0 by the compiler.
> Remove the redundant explicit assignments in kernel/audit.c to clean
> up the code, align with standard kernel coding style, and fix the
> following checkpatch.pl errors:
> 
>  ./scripts/checkpatch.pl kernel/audit.c | grep -A2 ERROR:
>  ERROR: do not initialise statics to 0
>  +	static unsigned long	last_check = 0;
>  --
>  ERROR: do not initialise statics to 0
>  +	static int		messages   = 0;
>  --
>  ERROR: do not initialise statics to 0
>  +	static unsigned long	last_msg = 0;
> 
> Signed-off-by: Ricardo Robaina <[email protected]>
> ---
>  kernel/audit.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Merged into audit/dev, thanks.

--
paul-moore.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.