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: <alpine.LNX.2.00.1101311544120.5725@pobox.suse.cz>
Date:	Mon, 31 Jan 2011 15:44:24 +0100 (CET)
From:	Jiri Kosina <jkosina@...e.cz>
To:	Alan Ott <alan@...nal11.us>
Cc:	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] hidraw: Replace Confusing += Operator with =

On Wed, 26 Jan 2011, Alan Ott wrote:

> Setting of the return value of hidraw_read() uses the += operator when
> = is more appropriate.  There is no case where ret can be anything
> other than zero when the assignment is made, making = equivalent to
> += and much more clear.
> 
> Signed-off-by: Alan Ott <alan@...nal11.us>
> ---
>  drivers/hid/hidraw.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
> index 468e87b..66fbcba 100644
> --- a/drivers/hid/hidraw.c
> +++ b/drivers/hid/hidraw.c
> @@ -91,7 +91,7 @@ static ssize_t hidraw_read(struct file *file, char __user *buffer, size_t count,
>  			ret = -EFAULT;
>  			goto out;
>  		}
> -		ret += len;
> +		ret = len;
>  

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.
--
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