Skip to contentSkip to conversation

use qemu_* ctype functions

PATCH Applied Christoph Egger 2 participants 2 messages Sep 21, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 use qemu_* ctype functions

Fix "warning: array subscript has type 'char' " on NetBSD.

cmd.c +1 -1
index ecca167..f77897e 100644
@@ -389,7 +389,7 @@ cvtnum(
        if (sp[1] != '\0')
                return -1LL;
 
-       c = tolower(*sp);
+       c = qemu_tolower(*sp);
        switch (c) {
        default:
                return i;
ui/keymaps.c +1 -1
index 78c7ea3..0545d49 100644
@@ -146,7 +146,7 @@ static kbd_layout_t *parse_keyboard_layout(const name2keysym_t *table,
                    if (rest && strstr(rest, "addupper")) {
                        char *c;
                        for (c = line; *c; c++)
-                           *c = toupper(*c);
+                           *c = qemu_toupper(*c);
                        keysym = get_keysym(table, line);
                        if (keysym)
                            add_keysym(line, keysym, keycode | 

SCANCODE_SHIFT, k);

Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
cmd.c +1 -1
index ecca167..f77897e 100644
@@ -389,7 +389,7 @@ cvtnum(
 	if (sp[1] != '\0')
 		return -1LL;
 
-	c = tolower(*sp);
+	c = qemu_tolower(*sp);
 	switch (c) {
 	default:
 		return i;
ui/keymaps.c +1 -1
index 78c7ea3..0545d49 100644
@@ -146,7 +146,7 @@ static kbd_layout_t *parse_keyboard_layout(const name2keysym_t *table,
 		    if (rest && strstr(rest, "addupper")) {
 			char *c;
 			for (c = line; *c; c++)
-			    *c = toupper(*c);
+			    *c = qemu_toupper(*c);
 			keysym = get_keysym(table, line);
 			if (keysym)
 			    add_keysym(line, keysym, keycode | SCANCODE_SHIFT, k);