mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-05 06:20:00 +02:00
cangen: 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:
@@ -504,7 +504,7 @@ resend:
|
|||||||
}
|
}
|
||||||
if (polltimeout) {
|
if (polltimeout) {
|
||||||
/* wait for the write socket (with timeout) */
|
/* wait for the write socket (with timeout) */
|
||||||
if (poll(&fds, 1, polltimeout) < 0) {
|
if (poll(&fds, 1, polltimeout) <= 0) {
|
||||||
perror("poll");
|
perror("poll");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user