mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-05 06:20:00 +02:00
cangen: move scope of variable ret
... so that it can be used in other parts of the main() functions, too. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
@@ -172,6 +172,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
|
int ret;
|
||||||
|
|
||||||
/* set seed value for pseudo random numbers */
|
/* set seed value for pseudo random numbers */
|
||||||
gettimeofday(&now, NULL);
|
gettimeofday(&now, NULL);
|
||||||
@@ -485,8 +486,6 @@ resend:
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (polltimeout) {
|
if (polltimeout) {
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* wait for the write socket (with timeout) */
|
/* wait for the write socket (with timeout) */
|
||||||
ret = poll(&fds, 1, polltimeout);
|
ret = poll(&fds, 1, polltimeout);
|
||||||
if (ret == 0 || (ret == -1 && errno != -EINTR)) {
|
if (ret == 0 || (ret == -1 && errno != -EINTR)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user