Skip to content

Commit

Permalink
Fix pipe read return value
Browse files Browse the repository at this point in the history
The function incorrectly returned false, whereas its return type is
ssize_t.
  • Loading branch information
rom1v committed Dec 20, 2024
1 parent dc2fcc4 commit fb47b87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/util/process_intr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit fb47b87

Please sign in to comment.