examples/power: fix overflowed value
authorReshma Pattan <reshma.pattan@intel.com>
Thu, 11 Apr 2019 11:13:36 +0000 (12:13 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 22 Apr 2019 22:15:10 +0000 (00:15 +0200)
commit7e7b7a1f427013374f38e1b101969a1dbce5c9c1
treef67be05930a4e997635dcf328ab12441f39b1599
parent57fad3e25fee6400af07a917e876ef8e4ee0e653
examples/power: fix overflowed value

Fix the data type of last_branches, last_branch_misses
from uint32_t to uint64_t, and for hits_diff, miss_diff
from int to int64_t respectively to fix possible
overflow or truncation.

Coverity issue: 337677
Fixes: 4b1a631b8a ("examples/vm_power: add oob monitoring functions")
Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
examples/vm_power_manager/oob_monitor_x86.c