From 42ee04ff64a9e88e0f5bc9d1a253fc287a0add8e Mon Sep 17 00:00:00 2001 From: Ramesh Shanmugasundaram Date: Thu, 30 Jun 2016 20:33:16 +0100 Subject: [PATCH] cangen: reset frame flags at the start of iteration (#16) This patch fixes a bug in cangen.c Bug: When used with -m option, if a CAN FD frame with BRS option set is sent, that flag never gets cleared for the subsequent frames. Fix: Reset frame.flags at the start of iteration. Signed-off-by: Ramesh Shanmugasundaram --- cangen.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cangen.c b/cangen.c index cd2228e..d086267 100644 --- a/cangen.c +++ b/cangen.c @@ -357,6 +357,7 @@ int main(int argc, char **argv) } while (running) { + frame.flags = 0; if (count && (--count == 0)) running = 0; -- 2.39.2