acpi: compare of array
PATCH 1/1 acpi: compare of array
From: Alan Cox <[email protected]>
This serves no purpose as it's an array not a pointer
Signed-off-by Alan Cox <[email protected]>
---
drivers/acpi/event.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/acpi/event.c +1 -2
@@ -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>", event.bus_id ? event. bus_id :"<unknown>" , event.type, event.data);
Quoted 15 lines · On Thursday 25 October 2012 15:57:50 Alan Cox wrote:
From: Alan Cox <[email protected]>
This serves no purpose as it's an array not a pointer
Signed-off-by Alan Cox <[email protected]>---
drivers/acpi/event.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/acpi/event.c +0
-0
drivers/acpi/event.c acpi_system_read_event(struct file *file, char __user * · line 70
Quoted 6 lines
drivers/acpi/event.c +1
-2@@ -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)?
drivers/acpi/event.c acpi_system_read_event(struct file *file, char __user * buffer, size_t count, · line 73
Quoted 3 lines
drivers/acpi/event.c +0
-0event.bus_id ? event. bus_id :"<unknown>" , event.type, event.data);
Regards,
Peter