lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YWXtAf2aAYyhCgvw@lillesand.fjasle.eu>
Date:   Tue, 12 Oct 2021 22:16:01 +0200
From:   Nicolas Schier <nicolas@...sle.eu>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] gen_init_cpio: add static const qualifiers

On ti. 12. okt. 2021 kl. 11.55 +0000 Masahiro Yamada wrote:
> Add 'const' to constant arrays. I also added missing 'static'.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>

Reviewed-by: Nicolas Schier <nicolas@...sle.eu>

> ---
> 
>  usr/gen_init_cpio.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/usr/gen_init_cpio.c b/usr/gen_init_cpio.c
> index 03b21189d58b..bf5b98c6cf8d 100644
> --- a/usr/gen_init_cpio.c
> +++ b/usr/gen_init_cpio.c
> @@ -188,7 +188,7 @@ struct generic_type {
>  	mode_t mode;
>  };
>  
> -static struct generic_type generic_type_table[] = {
> +static const struct generic_type generic_type_table[] = {
>  	[GT_DIR] = {
>  		.type = "dir",
>  		.mode = S_IFDIR
> @@ -491,7 +491,7 @@ static void usage(const char *prog)
>  		prog);
>  }
>  
> -struct file_handler file_handler_table[] = {
> +static const struct file_handler file_handler_table[] = {
>  	{
>  		.type    = "file",
>  		.handler = cpio_mkfile_line,
> -- 
> 2.30.2
> 

-- 
epost|xmpp: nicolas@...sle.eu          irc://oftc.net/nsc
↳ gpg: 18ed 52db e34f 860e e9fb  c82b 7d97 0932 55a0 ce7f
     -- frykten for herren er opphav til kunnskap --

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ