Module Name: src
Committed By: christos
Date: Sun Aug 9 17:42:48 UTC 2009
Modified Files:
src/sys/dev/acpi: sony_acpi.c
Log Message:
- pass unsigned char to toupper
- set snprintf did not bother to uppercase the name. Simplify and fix.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/acpi/sony_acpi.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/acpi/sony_acpi.c
diff -u src/sys/dev/acpi/sony_acpi.c:1.7 src/sys/dev/acpi/sony_acpi.c:1.8
--- src/sys/dev/acpi/sony_acpi.c:1.7 Thu May 1 12:06:41 2008
+++ src/sys/dev/acpi/sony_acpi.c Sun Aug 9 13:42:48 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: sony_acpi.c,v 1.7 2008/05/01 16:06:41 simonb Exp $ */
+/* $NetBSD: sony_acpi.c,v 1.8 2009/08/09 17:42:48 christos Exp $ */
/*-
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sony_acpi.c,v 1.7 2008/05/01 16:06:41 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sony_acpi.c,v 1.8 2009/08/09 17:42:48 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -120,7 +120,7 @@
(void)snprintf(buf, sizeof(buf), "G%s", rnode->sysctl_name);
for (ptr = buf; *ptr; ptr++)
- *ptr = toupper(*ptr);
+ *ptr = toupper((unsigned char)*ptr);
rv = acpi_eval_integer(sc->sc_node->ad_handle, buf, &acpi_val);
if (ACPI_FAILURE(rv)) {
@@ -138,7 +138,7 @@
if (error || newp == NULL)
return error;
- (void)snprintf(buf, sizeof(buf), "S%s", rnode->sysctl_name);
+ buf[0] = 'S';
acpi_val = val;
rv = sony_acpi_eval_set_integer(sc->sc_node->ad_handle, buf,
acpi_val, NULL);