mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-01 00:28:18 +00:00
btstack_stdin_posix: fix unused result warning
This commit is contained in:
parent
2d3020e7ab
commit
7fdcb0b5b7
@ -58,10 +58,11 @@ static void stdin_process(btstack_data_source_t *ds, btstack_data_source_callbac
|
||||
UNUSED(callback_type);
|
||||
|
||||
char data;
|
||||
read(stdin_source.source.fd, &data, 1);
|
||||
if (stdin_handler){
|
||||
(*stdin_handler)(data);
|
||||
}
|
||||
int result = read(stdin_source.source.fd, &data, 1);
|
||||
if (result < 1) return;
|
||||
if (stdin_handler == NULL) return;
|
||||
|
||||
(*stdin_handler)(data);
|
||||
}
|
||||
|
||||
void btstack_stdin_setup(void (*handler)(char c)){
|
||||
|
Loading…
Reference in New Issue
Block a user