i40e/base: future proof some sizeof calls
authorHelin Zhang <helin.zhang@intel.com>
Thu, 30 Apr 2015 15:03:36 +0000 (23:03 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 17 May 2015 21:18:32 +0000 (23:18 +0200)
commit702ea45e8b41a6db892d6c50ba0fc2c26ca57046
tree2c94d8ab94556ecff1a083482290b30597276032
parent1fa6324ad30bf5eee638be36fde1a466b8a64f93
i40e/base: future proof some sizeof calls

Make sure the sizeof() calls are taking the size of the actual
struct that we care about. By using the pointer variable, it will
always get the right struct size, even if the variable type
changes sometime in the future.

Test report: http://www.dpdk.org/ml/archives/dev/2015-May/017384.html

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Tested-by: Min Cao <min.cao@intel.com>
lib/librte_pmd_i40e/i40e/i40e_common.c