Skip to content

Commit

Permalink
cansequence: do_send(): fix errno check
Browse files Browse the repository at this point in the history
"errno" hold the positive error value.

Link: linux-can#448
Reported-by:  Adien Akhmad <[email protected]>
Suggested-by: Oliver Hartkopp <[email protected]>
Fixes: fb5903f ("[cansequece] added various improvements")
Signed-off-by: Marc Kleine-Budde <[email protected]>
  • Loading branch information
marckleinebudde committed Aug 28, 2023
1 parent 79601bd commit 87a6788
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cansequence.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ static void do_send()
}

err = poll(fds, 1, 1000);
if (err == 0 || (err == -1 && errno != -EINTR)) {
if (err == 0 || (err == -1 && errno != EINTR)) {
perror("poll()");
exit(EXIT_FAILURE);
}
Expand Down

0 comments on commit 87a6788

Please sign in to comment.