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>] [day] [month] [year] [list]
Message-ID: <87muva2zix.fsf@notabene.neil.brown.name>
Date:   Mon, 02 Jul 2018 11:32:22 +1000
From:   NeilBrown <neil@...wn.name>
To:     Rishabh Bhatnagar <rishabhb@...eaurora.org>, tgraf@...g.ch,
        linux-arm-msm@...r.kernel.org
Cc:     herbert@...dor.apana.org.au, linux-kernel@...r.kernel.org,
        Rishabh Bhatnagar <rishabhb@...eaurora.org>
Subject: Re: [PATCH] lib: rhashtable: Correct self-assignment in rhashtable.c


(added netdev@...r.kernel.org)

On Sun, Jul 01 2018, Rishabh Bhatnagar wrote:

> In file lib/rhashtable.c line 777, skip variable is assigned to
> itself. The following error was observed:
>
> lib/rhashtable.c:777:41: warning: explicitly assigning value of
> variable of type 'int' to itself [-Wself-assign] error, forbidden
> warning: rhashtable.c:777
> This error was found when compiling with Clang 6.0. Change it to iter->skip.
>
> Change-Id: I5abd1ce5ba76737a73bd6eca94b07b1bd5267523
> Signed-off-by: Rishabh Bhatnagar <rishabhb@...eaurora.org>

Thanks for catching that!
Reviewed-by: NeilBrown <neilb@...e.com>

Thanks,
NeilBrown

> ---
>  lib/rhashtable.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/rhashtable.c b/lib/rhashtable.c
> index 9427b57..3109b2e 100644
> --- a/lib/rhashtable.c
> +++ b/lib/rhashtable.c
> @@ -774,7 +774,7 @@ int rhashtable_walk_start_check(struct rhashtable_iter *iter)
>  				skip++;
>  				if (list == iter->list) {
>  					iter->p = p;
> -					skip = skip;
> +					iter->skip = skip;
>  					goto found;
>  				}
>  			}
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project

Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ