[coreboot-gerrit] Patch set updated for coreboot: libpayload/.../PDCurses: Improve ncurses compatibility
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Wed Dec 14 08:53:57 CET 2016
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17836
-gerrit
commit 497612a4252d8ee096d6eb0f4607a9243230ced0
Author: Patrick Georgi <pgeorgi at chromium.org>
Date: Tue Dec 13 15:50:23 2016 +0100
libpayload/.../PDCurses: Improve ncurses compatibility
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 at chromium.org>
Found-by: Coverity Scan #1260797
---
payloads/libpayload/curses/PDCurses/pdcurses/getyx.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/payloads/libpayload/curses/PDCurses/pdcurses/getyx.c b/payloads/libpayload/curses/PDCurses/pdcurses/getyx.c
index 1c03917..0f39c48 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;
}
}
More information about the coreboot-gerrit
mailing list