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:	Sun, 27 May 2007 23:01:46 +0200 (CEST)
From:	Guennadi Liakhovetski <g.liakhovetski@....de>
To:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
cc:	Auke Kok <auke-jan.h.kok@...el.com>, randy.dunlap@...cle.com,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] [condingstyle] Add chapter on tests

On Sat, 26 May 2007, Jan Engelhardt wrote:

> +Testing for a flag, as done in the following example, is redundant and
> +can be shortened.
> +
> +	if ((v & GFP_KERNEL) == GFP_KERNEL)
> +		return;
> +
> +should become
> +
> +	if (v & GFP_KERNEL)
> +		return;

This looks wrong to me. These two are only equivalent if the "flag" only 
has 1 bit. And already here you fall into this trap:

#define GFP_KERNEL	(__GFP_WAIT | __GFP_IO | __GFP_FS)

Thanks
Guennadi
---
Guennadi Liakhovetski
-
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