提交 81b00c96 编写于 作者: G Gerd Hoffmann

input-linux: fix Coverity warning

Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
Message-id: 1458129049-12484-1-git-send-email-kraxel@redhat.com
上级 0e066b2c
......@@ -213,6 +213,13 @@ static void input_linux_event_keyboard(void *opaque)
*/
continue;
}
if (event.code >= KEY_CNT) {
/*
* Should not happen. But better safe than sorry,
* and we make Coverity happy too.
*/
continue;
}
/* keep track of key state */
if (!il->keydown[event.code] && event.value) {
il->keydown[event.code] = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册