Re: [PATCH] cangen: flush the CAN frame at each iteration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




diff --git a/cangen.c b/cangen.c
index ab8122c..d7392b6 100644
--- a/cangen.c
+++ b/cangen.c
@@ -384,7 +384,7 @@ int main(int argc, char **argv)
      }
      while (running) {
-        frame.flags = 0;
+        memset(&frame, 0, sizeof(frame));

But this patch breaks everything which is not in random mode.

Analogue to frame.flags we just need to clear frame.len8_dlc

I've tagged you as author because of the great description but changed the code a bit ;-)

https://github.com/hartkopp/can-utils/commit/0b6af299d1b92c76447ce24f31702efb8eda02fa

Best,
Oliver




[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux