Re: [PATCH] ACPI: fix test for hex digit.

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

 



On Thu, 2014-07-31 at 01:22 +0530, Arjun Sreedharan wrote:
> decimal 0 is ascii for NULL. Hex digit matching should be from '0'
> (decimal 30 of ascii) to '9' and 'A' to 'F'.
> Unfixed version returns true for #,$,%,& etc.
[]
> diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi/acpi_pnp.c
[]
> @@ -322,7 +322,7 @@ static const struct acpi_device_id acpi_pnp_device_ids[] = {
>  
>  static bool is_hex_digit(char c)
>  {
> -	return (c >= 0 && c <= '9') || (c >= 'A' && c <= 'F');
> +	return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F');
>  }

Maybe delete this and do s/is_hex_digit/isxdigit/ ?


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux