Patchwork [8/8] use qemu_* ctype functions

login
register
mail settings
Submitter Stefan Hajnoczi
Date Sept. 21, 2011, 10:26 a.m.
Message ID <1316600766-5541-9-git-send-email-stefanha@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/115762/
State New
Headers show

Comments

Stefan Hajnoczi - Sept. 21, 2011, 10:26 a.m.
From: Christoph Egger <Christoph.Egger@amd.com>

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        |    2 +-
 ui/keymaps.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/cmd.c b/cmd.c
index ecca167..f77897e 100644
--- 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;
diff --git a/ui/keymaps.c b/ui/keymaps.c
index 81003bb..f54a114 100644
--- a/ui/keymaps.c
+++ b/ui/keymaps.c
@@ -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);