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] [thread-next>] [day] [month] [year] [list]
Message-ID: <a67042bc-ec43-17a4-257e-8276646fc0e3@suse.de>
Date: Fri, 1 Sep 2023 14:07:21 +0300
From: Denis Kirjanov <dkirjanov@...e.de>
To: Li zeming <zeming@...china.com>, davem@...emloft.net,
 edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net/socket: Remove unnecessary ‘0’ values from used



On 9/2/23 21:22, Li zeming wrote:
> used is assigned first, so it does not need to initialize the
> assignment.

that should be posted to net-next once it open

> 
> Signed-off-by: Li zeming <zeming@...china.com>
> ---
>  net/socket.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/socket.c b/net/socket.c
> index 2b0e54b2405c..743e54eba06f 100644
> --- a/net/socket.c
> +++ b/net/socket.c
> @@ -569,12 +569,12 @@ static ssize_t sockfs_listxattr(struct dentry *dentry, char *buffer,
>  				size_t size)
>  {
>  	ssize_t len;
> -	ssize_t used = 0;
> +	ssize_t used;
>  
>  	len = security_inode_listsecurity(d_inode(dentry), buffer, size);
>  	if (len < 0)
>  		return len;
> -	used += len;
> +	used = len;
>  	if (buffer) {
>  		if (size < used)
>  			return -ERANGE;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ