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
parent
6d47f5c22b
commit
001b230b10
3
cangen.c
3
cangen.c
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue