canfdtest: can_echo_gen(): decrease scope of struct canfd_frame rx_frame

This commit is contained in:
Marc Kleine-Budde
2023-12-24 13:44:13 +01:00
parent 104072f038
commit 874b0d9fae
+2 -1
View File
@@ -314,7 +314,6 @@ static int can_echo_gen(void)
{ {
struct canfd_frame *tx_frames; struct canfd_frame *tx_frames;
bool *recv_tx; bool *recv_tx;
struct canfd_frame rx_frame;
unsigned char counter = 0; unsigned char counter = 0;
int send_pos = 0, recv_rx_pos = 0, recv_tx_pos = 0, unprocessed = 0, loops = 0; int send_pos = 0, recv_rx_pos = 0, recv_tx_pos = 0, unprocessed = 0, loops = 0;
int err = 0; int err = 0;
@@ -357,6 +356,8 @@ static int can_echo_gen(void)
else else
millisleep(1); millisleep(1);
} else { } else {
struct canfd_frame rx_frame;
if (recv_frame(&rx_frame)) { if (recv_frame(&rx_frame)) {
err = -1; err = -1;
goto out_free; goto out_free;