mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-06 06:49:53 +02:00
canfdtest: make use of return value of check_frame
check_frame has a return value. Make use of this in can_echo_dut which then is evaluated and returned thereof in main() Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
This commit is contained in:
+3
-2
@@ -264,6 +264,7 @@ static int can_echo_dut(void)
|
|||||||
{
|
{
|
||||||
unsigned int frame_count = 0;
|
unsigned int frame_count = 0;
|
||||||
struct can_frame frame;
|
struct can_frame frame;
|
||||||
|
int err = 0;
|
||||||
|
|
||||||
while (running) {
|
while (running) {
|
||||||
if (recv_frame(&frame))
|
if (recv_frame(&frame))
|
||||||
@@ -275,7 +276,7 @@ static int can_echo_dut(void)
|
|||||||
print_frame(frame.can_id, frame.data, frame.can_dlc, 0);
|
print_frame(frame.can_id, frame.data, frame.can_dlc, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
check_frame(&frame);
|
err = check_frame(&frame);
|
||||||
inc_frame(&frame);
|
inc_frame(&frame);
|
||||||
if (send_frame(&frame))
|
if (send_frame(&frame))
|
||||||
return -1;
|
return -1;
|
||||||
@@ -290,7 +291,7 @@ static int can_echo_dut(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int can_echo_gen(void)
|
static int can_echo_gen(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user