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: <20160429142110.b4039a422866754bc914b8b2@linux-foundation.org>
Date:	Fri, 29 Apr 2016 14:21:10 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Minfei Huang <mnghuan@...il.com>
Cc:	labbott@...oraproject.org, rjw@...ysocki.net,
	mgorman@...hsingularity.net, mhocko@...e.com, vbabka@...e.cz,
	rientjes@...gle.com, kirill.shutemov@...ux.intel.com,
	iamjoonsoo.kim@....com, izumi.taku@...fujitsu.com,
	alexander.h.duyck@...hat.com, hannes@...xchg.org,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Use existing helper to convert "on/off" to boolean

On Fri, 29 Apr 2016 13:47:04 +0800 Minfei Huang <mnghuan@...il.com> wrote:

> It's more convenient to use existing function helper to convert string
> "on/off" to boolean.
> 
> ...
>
> --- a/lib/kstrtox.c
> +++ b/lib/kstrtox.c
> @@ -326,7 +326,7 @@ EXPORT_SYMBOL(kstrtos8);
>   * @s: input string
>   * @res: result
>   *
> - * This routine returns 0 iff the first character is one of 'Yy1Nn0', or
> + * This routine returns 0 if the first character is one of 'Yy1Nn0', or

That isn't actually a typo.  "iff" is shorthand for "if and only if". 
ie: kstrtobool() will not return 0 in any other case.

Use of "iff" is a bit pretentious but I guess it does convey some
conceivably useful info.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ