Re: [PATCH] libblkid: Make use of isalnum()

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

 



On Sun, Feb 17, 2013 at 03:37:32AM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx>
> 
> ---
>  libblkid/src/encode.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/libblkid/src/encode.c b/libblkid/src/encode.c
> index ff57be4..e96e0e2 100644
> --- a/libblkid/src/encode.c
> +++ b/libblkid/src/encode.c
> @@ -181,9 +181,7 @@ static int replace_whitespace(const char *str, char *to, size_t len)
>  
>  static int is_whitelisted(char c, const char *white)
>  {
> -	if ((c >= '0' && c <= '9') ||
> -	    (c >= 'A' && c <= 'Z') ||
> -	    (c >= 'a' && c <= 'z') ||
> +	if (isalnum (c) ||

 It seems like locale sensitive function ;-)

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux