Re: [PATCH] acpi: compare of array

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

 



On Thursday 25 October 2012 15:57:50 Alan Cox wrote:
> From: Alan Cox <alan@xxxxxxxxxxxxxxx>
> 
> This serves no purpose as it's an array not a pointer
> 
> Signed-off-by: Alan Cox <alan@xxxxxxxxxxxxxxx>
> ---
> 
>  drivers/acpi/event.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c
> index 1442737..f84df83 100644
> --- a/drivers/acpi/event.c
> +++ b/drivers/acpi/event.c
> @@ -67,8 +67,7 @@ acpi_system_read_event(struct file *file, char __user *
> buffer, size_t count, return result;
> 
>  		chars_remaining = sprintf(str, "%s %s %08x %08x\n",
> -					  event.device_class ? event.
> -					  device_class : "<unknown>",
> +					  event.device_class : "<unknown>",
: "<unknown>" should be removed too to avoid a compile error. If it is an 
array, is it not better to check event.device_class[0] != 0 (an empty string)?

>  					  event.bus_id ? event.
>  					  bus_id : "<unknown>", event.type,
>  					  event.data);

Regards,
Peter
--
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