summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/proc.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2009-10-02 00:48:40 +0200
committerLen Brown <len.brown@intel.com>2009-10-28 16:49:37 +0100
commit52a2b11cafb1b14bacfc65a20966da5ba3a863e1 (patch)
tree0400a7b6aecaac81bd9fa71fa30292120ee0840c /drivers/acpi/proc.c
parentLinux 2.6.32-rc5 (diff)
downloadlinux-52a2b11cafb1b14bacfc65a20966da5ba3a863e1.tar.xz
linux-52a2b11cafb1b14bacfc65a20966da5ba3a863e1.zip
ACPI: clean up video.c boundary checks and types
proc.c and video.c are a bit sloppy around types and style, confusing gcc for a new feature that'll be in 2.6.33 and will cause a warning on the current code. This patch changes if (foo + 1 > sizeof bar) into if (foo >= sizeof(bar)) which is more kernel-style. it also changes a variable in proc.c to unsigned; it gets assigned a value from an unsigned type, and is then only compared for > not for negative, so using unsigned is just outright the right type Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/proc.c')
-rw-r--r--drivers/acpi/proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c
index f8b6f555ba52..d0d25e2e1ced 100644
--- a/drivers/acpi/proc.c
+++ b/drivers/acpi/proc.c
@@ -393,7 +393,7 @@ acpi_system_write_wakeup_device(struct file *file,
struct list_head *node, *next;
char strbuf[5];
char str[5] = "";
- int len = count;
+ unsigned int len = count;
struct acpi_device *found_dev = NULL;
if (len > 4)