diff options
| author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2019-06-14 16:23:20 -0700 |
|---|---|---|
| committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2019-06-28 15:59:48 -0700 |
| commit | af07adbb1cfc207b9ad2bacd40332723a7833f4a (patch) | |
| tree | 1ec9a8f58c759940028e2bbe7df8c9a77a4cab74 /tools/perf/scripts/python/export-to-sqlite.py | |
| parent | 583cf7be751987005c70f4614e148eb5611f8060 (diff) | |
iavf: use struct_size() helper
Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes, in particular in the
context in which this code is being used.
So, replace code of the following form:
sizeof(struct virtchnl_ether_addr_list) + (count * sizeof(struct virtchnl_ether_addr))
with:
struct_size(veal, list, count)
and so on...
This code was detected with the help of Coccinelle.
Signed-off-by: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions
