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]
Date:   Wed, 4 Mar 2020 11:16:25 -0600
From:   Steve French <smfrench@...il.com>
To:     Qiujun Huang <hqjagain@...il.com>
Cc:     Steve French <sfrench@...ba.org>,
        CIFS <linux-cifs@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] fs/cifs: fix gcc warning in sid_to_id

merged into cifs-2.6.git for-next

On Wed, Mar 4, 2020 at 1:42 AM Qiujun Huang <hqjagain@...il.com> wrote:
>
> fix warning [-Wunused-but-set-variable] at variable 'rc',
> keeping the code readable.
>
> Signed-off-by: Qiujun Huang <hqjagain@...il.com>
> ---
>  fs/cifs/cifsacl.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
> index 716574a..ae42163 100644
> --- a/fs/cifs/cifsacl.c
> +++ b/fs/cifs/cifsacl.c
> @@ -342,7 +342,7 @@
>  sid_to_id(struct cifs_sb_info *cifs_sb, struct cifs_sid *psid,
>                 struct cifs_fattr *fattr, uint sidtype)
>  {
> -       int rc;
> +       int rc = 0;
>         struct key *sidkey;
>         char *sidstr;
>         const struct cred *saved_cred;
> @@ -450,11 +450,12 @@
>          * fails then we just fall back to using the mnt_uid/mnt_gid.
>          */
>  got_valid_id:
> +       rc = 0;
>         if (sidtype == SIDOWNER)
>                 fattr->cf_uid = fuid;
>         else
>                 fattr->cf_gid = fgid;
> -       return 0;
> +       return rc;
>  }
>
>  int
> --
> 1.8.3.1
>


-- 
Thanks,

Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ