mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-06 06:49:53 +02:00
cangen: initialize reserved struct CAN(FD) frame elements
With 'cansend' and other tools the reserved elements are set to zero. Fix this missing initialization in 'cangen'. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
This commit is contained in:
@@ -838,7 +838,10 @@ int main(int argc, char **argv)
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
while (running) {
|
while (running) {
|
||||||
|
/* clear values but preserve cu.fd.len */
|
||||||
cu.fd.flags = 0;
|
cu.fd.flags = 0;
|
||||||
|
cu.fd.__res0 = 0;
|
||||||
|
cu.fd.__res1 = 0;
|
||||||
|
|
||||||
if (count && (--count == 0))
|
if (count && (--count == 0))
|
||||||
running = 0;
|
running = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user