
12 Apr
2017
12 Apr
'17
3:26 p.m.
On Wed, Apr 12, 2017 at 12:27:12PM +0100, Daniel P. Berrange wrote:
The virPerfGetEvent method pointlessly checks for a NULL parameter and the range of an enum value. The whole point of using an enum is that we can avoid such checks. Just replace calls to virPerfGetEvent, with perf->events[type] array access.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com> --- src/util/virperf.c | 44 ++++++++------------------------------------ 1 file changed, 8 insertions(+), 36 deletions(-)
ACK Jan