Re: [PATCH] wildmatch: properly fold case everywhere

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 28, 2013 at 7:32 PM, Anthony Ramine <n.oxyde@xxxxxxxxx> wrote:
> @@ -196,6 +196,11 @@ static int dowild(const uchar *p, const uchar *text, unsigned int flags)
>                                         }
>                                         if (t_ch <= p_ch && t_ch >= prev_ch)
>                                                 matched = 1;
> +                                       else if ((flags & WM_CASEFOLD) && ISLOWER(t_ch)) {
> +                                               t_ch = toupper(t_ch);

This happens in a while loop where t_ch may be used again. Should we
make a local copy of toupper(t_ch) and leave t_ch untouched?

> +                                               if (t_ch <= p_ch && t_ch >= prev_ch)
> +                                                       matched = 1;
> +                                       }
>                                         p_ch = 0; /* This makes "prev_ch" get set to 0. */
>                                 } else if (p_ch == '[' && p[1] == ':') {
>                                         const uchar *s;
--
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]