[libvirt] [PATCH v2 2/2] perf: get rid of pointless virPerfGetEvent() method

Ján Tomko jtomko at redhat.com
Wed Apr 12 13:26:50 UTC 2017


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 at redhat.com>
>---
> src/util/virperf.c | 44 ++++++++------------------------------------
> 1 file changed, 8 insertions(+), 36 deletions(-)
>

ACK

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170412/43063508/attachment-0001.sig>


More information about the libvir-list mailing list