Clear the whole structure instead the size of a pointer
commit2c11c7afe90f4c70c721c9b4ab7bd45efe9d6aba
authorPetr Cvek <petrcvekcz@gmail.com>
Tue, 5 Mar 2019 23:31:40 +0000 (6 00:31 +0100)
committerPetr Cvek <petrcvekcz@gmail.com>
Sat, 9 Mar 2019 00:11:09 +0000 (9 01:11 +0100)
tree06e3c0b6ac6009827a6110498078bde0ac446413
parent42e4e24a81a817eb5e71ee808d96a1e314aca9a7
Clear the whole structure instead the size of a pointer

The type of "bak" and "pattern" is uint8. The compiler does not have
a way to know how long this array will be. Use data_size from allocation.

Some newer versions may have this fixed.

TODO there will be probably more bugs of this type in the code. Check it.
TODO^2 change the allocation to support zeroing?

Signed-off-by: Petr Cvek <petrcvekcz@gmail.com>
tools/dutserver/linux/dut_utest_nv.c
tools/mttools/shared/mtlk_cli_client.c
tools/mttools/shared/mtlk_cli_server.c
wireless/driver/linux/mtlk_df_user.c