From 26842295b83e5307b2be56463383b9b3ffb67a4b Mon Sep 17 00:00:00 2001 From: Philippe Schenker Date: Tue, 12 Apr 2022 17:18:22 +0200 Subject: [PATCH] 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 --- canfdtest.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/canfdtest.c b/canfdtest.c index c8d407e..48f0255 100644 --- a/canfdtest.c +++ b/canfdtest.c @@ -264,6 +264,7 @@ static int can_echo_dut(void) { unsigned int frame_count = 0; struct can_frame frame; + int err = 0; while (running) { 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); } - check_frame(&frame); + err = check_frame(&frame); inc_frame(&frame); if (send_frame(&frame)) return -1; @@ -290,7 +291,7 @@ static int can_echo_dut(void) } } - return 0; + return err; } static int can_echo_gen(void)