[PATCH v2 09/65] bpf: use is_whitespace()
Jan Beulich
jbeulich@suse.com
Tue Jan 28 10:31:50 GMT 2025
On 28.01.2025 10:21, Alan Modra wrote:
> On Mon, Jan 27, 2025 at 05:08:18PM +0100, Jan Beulich wrote:
>> Wherever blanks are permissible in input, tabs ought to be permissible,
>> too. This is particularly relevant when -f is passed to gas (alongside
>> appropriate input). At the same time use is_end_of_stmt() instead of
>> open-coded nul char checks.
>> ---
>> v2: New.
>>
>> --- a/gas/config/tc-bpf.c
>> +++ b/gas/config/tc-bpf.c
>> @@ -1274,7 +1274,7 @@ parse_expression (char *s, expressionS *
>> these whitespaces. */
>> {
>> char *p;
>> - for (p = s - 1; p >= saved_s && *p == ' '; --p)
>> + for (p = s - 1; p >= saved_s && is_whitespace (*p); --p)
>> --s;
>> }
>>
>> @@ -1501,7 +1501,7 @@ md_assemble (char *str ATTRIBUTE_UNUSED)
>> if (*p == ' ')
>> {
>> /* Expect zero or more spaces. */
>> - while (*s != '\0' && (*s == ' ' || *s == '\t'))
>> + while (!is_end_of_stmt (*s) && is_whitespace (*s))
>
> Just is_whitespace here.
Oh, yes. In later patches I did that, but then forgot to check back in
earlier ones. Thanks for noticing.
Jan
More information about the Binutils
mailing list