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>
pull/506/head
Oliver Hartkopp 2024-03-18 12:35:29 +01:00
parent 6d47f5c22b
commit 001b230b10
1 changed files with 3 additions and 0 deletions

View File

@ -838,7 +838,10 @@ int main(int argc, char **argv)
return 1;
while (running) {
/* clear values but preserve cu.fd.len */
cu.fd.flags = 0;
cu.fd.__res0 = 0;
cu.fd.__res1 = 0;
if (count && (--count == 0))
running = 0;