Messages in this thread | | | From | Andy Shevchenko <> | Date | Sat, 27 May 2017 22:39:03 +0300 | Subject | Re: [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
| |