Skip to content

Commit

Permalink
Merge pull request #454 from marckleinebudde/fix-poll-errno
Browse files Browse the repository at this point in the history
Fix poll errno
  • Loading branch information
marckleinebudde authored Aug 28, 2023
2 parents 79601bd + 87e6af1 commit 33b2ae6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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
4 changes: 2 additions & 2 deletions j1939cat.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ static int j1939cat_send_loop(struct j1939cat_priv *priv, int out_fd, char *buf,

ret = poll(&fds, 1, priv->polltimeout);
if (ret == -1) {
if (errno == -EINTR)
if (errno == EINTR)
continue;
else
return -errno;
Expand Down Expand Up @@ -575,7 +575,7 @@ static int j1939cat_recv(struct j1939cat_priv *priv)

ret = poll(&fds, 1, priv->polltimeout);
if (ret == -1) {
if (errno == -EINTR)
if (errno == EINTR)
continue;
else
return -errno;
Expand Down

0 comments on commit 33b2ae6

Please sign in to comment.