pn53x-sam: fix truncated stdio return value
Problem reported by Coverity: CID 1090318 (#1 of 1): Truncated stdio return value (CHAR_IO) char_io: Assigning the return value of "getchar(void)" to char "input" truncates its value
This commit is contained in:
parent
679897d0a1
commit
e2135dbaa5
1 changed files with 1 additions and 1 deletions
|
@ -114,7 +114,7 @@ main(int argc, const char *argv[])
|
|||
printf(">> ");
|
||||
|
||||
// Take user's choice
|
||||
char input = getchar();
|
||||
int input = getchar();
|
||||
printf("\n");
|
||||
if ((input < '1') || (input > '3')) {
|
||||
ERR("%s", "Invalid selection.");
|
||||
|
|
Loading…
Reference in a new issue