]> xenbits.xensource.com Git - libvirt.git/commit
util: mdev: Use a local variable instead of a direct pointer access
authorErik Skultety <eskultet@redhat.com>
Fri, 28 Apr 2017 05:52:52 +0000 (07:52 +0200)
committerErik Skultety <eskultet@redhat.com>
Thu, 4 May 2017 05:54:42 +0000 (07:54 +0200)
commit2739a983f235f0d92d210800d61bd1a195f01850
treece71ee366ebba04fd8818745bd04094dddde258d
parent2f0b3b103b329b0b9656ac4fc8b5f94a5c2fa051
util: mdev: Use a local variable instead of a direct pointer access

Use a local variable to hold data, rather than accessing the pointer
after calling virMediatedDeviceListAdd (therefore VIR_APPEND_ELEMENT).
Although not causing an issue at the moment, this change is a necessary
prerequisite for tweaking virMediatedDeviceListAdd in a separate patch,
which will take a reference for the source pointer (instead of pointer
value) and will clear it along the way.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Laine Stump <laine@laine.org>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/util/virmdev.c