mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-04-19 19:15:08 +00:00
Fix pipe read return value
The function incorrectly returned false, whereas its return type is ssize_t.
This commit is contained in:
parent
dc2fcc46f5
commit
fb47b87eeb
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ sc_pipe_read_intr(struct sc_intr *intr, sc_pid pid, sc_pipe pipe, char *data,
|
|||
size_t len) {
|
||||
if (intr && !sc_intr_set_process(intr, pid)) {
|
||||
// Already interrupted
|
||||
return false;
|
||||
return -1;
|
||||
}
|
||||
|
||||
ssize_t ret = sc_pipe_read(pipe, data, len);
|
||||
|
@ -22,7 +22,7 @@ sc_pipe_read_all_intr(struct sc_intr *intr, sc_pid pid, sc_pipe pipe,
|
|||
char *data, size_t len) {
|
||||
if (intr && !sc_intr_set_process(intr, pid)) {
|
||||
// Already interrupted
|
||||
return false;
|
||||
return -1;
|
||||
}
|
||||
|
||||
ssize_t ret = sc_pipe_read_all(pipe, data, len);
|
||||
|
|
Loading…
Add table
Reference in a new issue