Merge pull request #454 from marckleinebudde/fix-poll-errno

Fix poll errno
pull/455/head
Marc Kleine-Budde 2023-08-28 16:19:46 +02:00 committed by GitHub
commit 33b2ae6f88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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);
}

View File

@ -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;
@ -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;