On 06/06/2018 12:30 PM, Andreas Schwab wrote:
On Jun 06 2018, Carlos O'Donell <carlos@redhat.com> wrote:
+ /* Find longest valid input sequence. */
+ ilen = 0;
+ while ((input[ilen] >= 'A' && input[ilen] <= 'Z')
+ || (input[ilen] >= 'a' && input[ilen] <= 'z')
+ || (input[ilen] >= '0' && input[ilen] <= '9')
+ || (input[ilen] == '_'))
+ ++ilen;
+
+ rlen = strlen (ref);
+
+ /* Can't be the DST we are looking for. */
+ if (rlen != ilen)
+ return 0;
Why do you need that? Just compare, then check the next character.
Are you suggesting that:
~~~
rlen = strlen (ref);
/* Can't be the DST we are looking for. */
if (rlen != ilen)
return 0;
~~~
Can be dropped because we are going to compare the strings anyway?
I can do that.