diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2021-05-12 07:42:31 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-05-12 09:40:45 +0200 |
commit | 109142e36aae88cec7abee1ecb6e756146d871a0 (patch) | |
tree | 4edf6b19fd5c6c139e93e4d468f717e6c8884a7b /lib | |
parent | feeb9fbe964af1e00658335e06e72e739a814070 (diff) | |
download | barebox-109142e36aae88cec7abee1ecb6e756146d871a0.tar.gz barebox-109142e36aae88cec7abee1ecb6e756146d871a0.tar.xz |
readline_simple: Fix compiler warning
char can be an unsigned type. To test the getchar() return value against
negative values we have to use a signed type. Use int instead.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/readline_simple.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/readline_simple.c b/lib/readline_simple.c index fcdbca41a9..2e52bfc2a0 100644 --- a/lib/readline_simple.c +++ b/lib/readline_simple.c @@ -44,7 +44,7 @@ int readline (const char *prompt, char *line, int len) int n = 0; /* buffer index */ int plen = 0; /* prompt length */ int col; /* output column cnt */ - char c; + int c; /* print prompt */ if (prompt) { |