canfdtest: can_echo_gen(): initialize tx_frames with zero

This avoids having the padding in the struct can_fame contain bogus
values, which are interpreted by "candump -x" as CAN-FD BRS and ESI
values.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
pull/194/head
Marc Kleine-Budde 2019-12-08 00:52:17 +01:00
parent 8027b498cf
commit 506f6f3043
1 changed files with 1 additions and 1 deletions

View File

@ -236,7 +236,7 @@ static int can_echo_dut(void)
static int can_echo_gen(void) static int can_echo_gen(void)
{ {
struct can_frame tx_frames[CAN_MSG_COUNT]; struct can_frame tx_frames[CAN_MSG_COUNT] = { };
int recv_tx[CAN_MSG_COUNT]; int recv_tx[CAN_MSG_COUNT];
struct can_frame rx_frame; struct can_frame rx_frame;
unsigned char counter = 0; unsigned char counter = 0;