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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <878uq0l88f.fsf@devron.myhome.or.jp>
Date:	Sun, 18 May 2014 00:45:20 +0900
From:	OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
To:	Manuel Schölling <manuel.schoelling@....de>
Cc:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] fs: FAT: Cleanup string initializations (char[] instead of char *)

Manuel Schölling <manuel.schoelling@....de> writes:

> Initializations like 'char *foo = "bar"' will create two variables: a static
> string and a pointer (foo) to that static string. Instead 'char foo[] = "bar"'
> will declare a single variable and will end up in shorter
> assembly (according to Jeff Garzik on the KernelJanitor's TODO list).
>
> Signed-off-by: Manuel Schölling <manuel.schoelling@....de>

Looks good.

Acked-by: OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>

> ---
>  fs/fat/inode.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/fat/inode.c b/fs/fat/inode.c
> index b3361fe..8b7d00e 100644
> --- a/fs/fat/inode.c
> +++ b/fs/fat/inode.c
> @@ -359,7 +359,7 @@ struct inode *fat_iget(struct super_block *sb, loff_t i_pos)
>  
>  static int is_exec(unsigned char *extension)
>  {
> -	unsigned char *exe_extensions = "EXECOMBAT", *walk;
> +	unsigned char exe_extensions[] = "EXECOMBAT", *walk;
>  
>  	for (walk = exe_extensions; *walk; walk += 3)
>  		if (!strncmp(extension, walk, 3))

-- 
OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ