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]
Date:	Wed, 23 Jul 2008 19:19:34 -0500
From:	"Steve French" <smfrench@...il.com>
To:	"Harvey Harrison" <harvey.harrison@...il.com>
Cc:	"Andrew Morton" <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] cifs: avoid mixing bool and le16

Seems like a cast to bool or an "if ...else" would be clearer than using !!
By the way I don't see this warning - is it a newer compiler warning?

On Wed, Jul 23, 2008 at 6:52 PM, Harvey Harrison
<harvey.harrison@...il.com> wrote:
> fs/cifs/cifssmb.c:3917:13: warning: incorrect type in assignment (different base types)
> fs/cifs/cifssmb.c:3917:13:    expected bool [unsigned] [usertype] is_unicode
> fs/cifs/cifssmb.c:3917:13:    got restricted __le16
>
> Signed-off-by: Harvey Harrison <harvey.harrison@...il.com>
> ---
>  fs/cifs/cifssmb.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
> index 4511b70..56f1a71 100644
> --- a/fs/cifs/cifssmb.c
> +++ b/fs/cifs/cifssmb.c
> @@ -3914,7 +3914,7 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
>        bool is_unicode;
>        struct dfs_referral_level_3 *ref;
>
> -       is_unicode = pSMBr->hdr.Flags2 & SMBFLG2_UNICODE;
> +       is_unicode = !!(pSMBr->hdr.Flags2 & SMBFLG2_UNICODE);
>        *num_of_nodes = le16_to_cpu(pSMBr->NumberOfReferrals);
>
>        if (*num_of_nodes < 1) {
> --
> 1.5.6.4.570.g052e
>
>
>
>



-- 
Thanks,

Steve
--
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