summaryrefslogtreecommitdiffstats
path: root/payloads
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2016-12-13 15:50:23 +0100
committerPatrick Georgi <pgeorgi@google.com>2016-12-14 18:02:51 +0100
commit5250852b0f5b789f610ffe6e460e57e16c39e04c (patch)
tree0eef092bc6bea5c0a7f11ce19b3e56f59599c884 /payloads
parent0f01c09ef19bb266df2443636cebb57c70cb4f49 (diff)
downloadcoreboot-5250852b0f5b789f610ffe6e460e57e16c39e04c.tar.gz
coreboot-5250852b0f5b789f610ffe6e460e57e16c39e04c.tar.bz2
coreboot-5250852b0f5b789f610ffe6e460e57e16c39e04c.zip
libpayload/.../PDCurses: Improve compatibility with ncurses
Coverity erroneously complains that we call wmove with x or y == -1, even though our copy of that function properly checks for that. But: setsyx is documented to always return OK (even on errors), so let it do that. (and make coverity happy in the process) Change-Id: I1bc9ba2a075037f0e1a855b67a93883978564887 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Found-by: Coverity Scan #1260797 Reviewed-on: https://review.coreboot.org/17836 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'payloads')
-rw-r--r--payloads/libpayload/curses/PDCurses/pdcurses/getyx.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/payloads/libpayload/curses/PDCurses/pdcurses/getyx.c b/payloads/libpayload/curses/PDCurses/pdcurses/getyx.c
index 1c0391766ccd..0f39c48d350f 100644
--- a/payloads/libpayload/curses/PDCurses/pdcurses/getyx.c
+++ b/payloads/libpayload/curses/PDCurses/pdcurses/getyx.c
@@ -135,9 +135,14 @@ int setsyx(int y, int x)
curscr->_leaveit = TRUE;
return OK;
}
+ else if (y == -1 || x == -1)
+ {
+ return OK;
+ }
else
{
curscr->_leaveit = FALSE;
- return wmove(curscr, y, x);
+ wmove(curscr, y, x);
+ return OK;
}
}