Re: [PATCH v3 3/6] lib/cmdline: Allow get_options() to take 0 to validate the input
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2021-01-22 13:49:55
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2021-01-22 13:49:55
On Fri, Jan 22, 2021 at 02:13:10PM +0100, Geert Uytterhoeven wrote:
On Fri, Jan 22, 2021 at 1:39 PM Andy Shevchenko [off-list ref] wrote:
...
quoted
+ while (i < nints || validate) { + int *pint = validate ? ints : ints + i;I think you can use NULL for validation, as per the documentation for get_option().
That's what takes me a long time to realize how this machinery works and no, unfortunately we may not use NULL, we have to keep the parsed number for the further operations. Thanks for review! -- With Best Regards, Andy Shevchenko