Skip to content

Commit

Permalink
input-linux: fix Coverity warning
Browse files Browse the repository at this point in the history
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 1458129049-12484-1-git-send-email-kraxel@redhat.com
  • Loading branch information
kraxel committed Mar 24, 2016
1 parent 0e066b2 commit 81b00c9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ui/input-linux.c
Expand Up @@ -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;
Expand Down

0 comments on commit 81b00c9

Please sign in to comment.