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>
pull/386/head
Marc Kleine-Budde 2022-03-27 14:43:02 +02:00
parent 8fb0e954b3
commit 4b6f8d62dd
1 changed files with 1 additions and 2 deletions

View File

@ -172,6 +172,7 @@ int main(int argc, char **argv)
struct timespec ts;
struct timeval now;
int ret;
/* set seed value for pseudo random numbers */
gettimeofday(&now, NULL);
@ -485,8 +486,6 @@ resend:
return 1;
}
if (polltimeout) {
int ret;
/* wait for the write socket (with timeout) */
ret = poll(&fds, 1, polltimeout);
if (ret == 0 || (ret == -1 && errno != -EINTR)) {