mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-05 06:20:00 +02:00
cansequence: exit program with failure in case of poll timeout
The poll function returns 0 to indicate a call timed out. Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
This commit is contained in:
+1
-1
@@ -216,7 +216,7 @@ static void do_send()
|
|||||||
}
|
}
|
||||||
|
|
||||||
err = poll(fds, 1, 1000);
|
err = poll(fds, 1, 1000);
|
||||||
if (err == -1 && errno != -EINTR) {
|
if (err == 0 || (err == -1 && errno != -EINTR)) {
|
||||||
perror("poll()");
|
perror("poll()");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user