mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-05 06:20:00 +02:00
canfdtest: can_echo_gen(): decrease scope of struct canfd_frame rx_frame
This commit is contained in:
+2
-1
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user