OSDN Git Service

use qemu_* ctype functions
authorChristoph Egger <Christoph.Egger@amd.com>
Wed, 21 Sep 2011 10:10:52 +0000 (11:10 +0100)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Wed, 21 Sep 2011 10:10:52 +0000 (11:10 +0100)
Fix "warning: array subscript has type 'char'" on NetBSD.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
cmd.c
ui/keymaps.c

diff --git a/cmd.c b/cmd.c
index ecca167..f77897e 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -389,7 +389,7 @@ cvtnum(
        if (sp[1] != '\0')
                return -1LL;
 
-       c = tolower(*sp);
+       c = qemu_tolower(*sp);
        switch (c) {
        default:
                return i;
index 81003bb..f54a114 100644 (file)
@@ -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);