On Sun, Jan 8, 2017 at 4:11 PM, Grazvydas Ignotas <nota...@gmail.com> wrote:
> On Sat, Jan 7, 2017 at 9:02 PM, Vladislav Egorov <vegorov...@gmail.com> wrote:
>> @@ -582,6 +609,333 @@ HEXADECIMAL_INTEGER       0[xX][0-9a-fA-F]+[uU]?
>>
>>  %%
>>
>> +static void
>> +glcpp_fast_skip_singleline_comment (glcpp_parser_t *parser, char **input)
>> +{
>> +   /* Skip // */
>> +   char *buf = *input + 2;
>> +
>> +   while (true) {
>> +      char ch = *buf;
>> +      if (ch == '\r' || ch == '\n' || ch == '\0')
>> +         break;
>> +      buf++;
>> +   }
>
> Looks like strpbrk() could be used here too?
> Also null char handling looks suspicious.

Ignore the null char comment, I've misread the code :(
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to