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:
Marc Kleine-Budde
2022-12-07 15:28:18 +01:00
parent 8fb0e954b3
commit 4b6f8d62dd
+1 -2
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)) {