mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Michael Olbrich <m.olbrich@pengutronix.de>
Subject: [PATCH 1/5] readkey: keys are unsigned char
Date: Mon, 23 Jan 2017 18:02:14 +0100	[thread overview]
Message-ID: <20170123170218.25139-2-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <20170123170218.25139-1-m.olbrich@pengutronix.de>

Otherwise values > 127 will become negative and are dropped.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
 lib/readkey.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/readkey.c b/lib/readkey.c
index 2870a5a9fee5..e72da0066bdc 100644
--- a/lib/readkey.c
+++ b/lib/readkey.c
@@ -51,8 +51,8 @@ static const struct esc_cmds esccmds[] = {
 
 int read_key(void)
 {
-	char c;
-	char esc[5];
+	unsigned char c;
+	unsigned char esc[5];
 	c = getchar();
 
 	if (c == 27) {
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2017-01-23 17:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23 17:02 [PATCH 0/5] EFI fixes Michael Olbrich
2017-01-23 17:02 ` Michael Olbrich [this message]
2017-01-23 17:02 ` [PATCH 2/5] serial: efi: improve input handling Michael Olbrich
2017-01-23 17:02 ` [PATCH 3/5] output: use '[0m' to reset colors Michael Olbrich
2017-01-23 17:02 ` [PATCH 4/5] efi: include and execute exit calls Michael Olbrich
2017-01-23 17:02 ` [PATCH 5/5] efi: don't unload drivers Michael Olbrich
2017-01-24  8:35 ` [PATCH 0/5] EFI fixes Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170123170218.25139-2-m.olbrich@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox