lkml.org 
[lkml]   [2017]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/2] kstrtox: delete end-of-string test
On Sun, May 14, 2017 at 10:37 PM, Alexey Dobriyan <adobriyan@gmail.com> wrote:
> Standard "while (*s)" test is unnecessary because NUL won't pass
> valid-digit test anyway. Save one branch per parsed character.

> - while (*s) {
> + while (1) {

In such cases I prefer

do {} while ();

Since it makes easier to reader to catch that the loop is going at
least once (and less error prone (1) vs. (l) depending on font in
use).

...however, I see that patch is already applied.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2017-05-27 21:40    [W:0.119 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site