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: <20161109.185643.1145389940936719190.davem@davemloft.net>
Date:   Wed, 09 Nov 2016 18:56:43 -0500 (EST)
From:   David Miller <davem@...emloft.net>
To:     asbjorn@...jorn.st
Cc:     jchapman@...alix.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v2 4/5] net: l2tp: cleanup: remove redundant
 condition

From: Asbjoern Sloth Toennesen <asbjorn@...jorn.st>
Date: Mon,  7 Nov 2016 20:39:27 +0000

> These assignments follow this pattern:
> 
> 	unsigned int foo:1;
> 	struct nlattr *nla = info->attrs[bar];
> 
> 	if (nla)
> 		foo = nla_get_flag(nla); /* expands to: foo = !!nla */
> 
> This could be simplified to: if (nla) foo = 1;
> but lets just remove the condition and use the macro,
> 
> 	foo = nla_get_flag(nla);
> 
> Signed-off-by: Asbjoern Sloth Toennesen <asbjorn@...jorn.st>

Applied.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ