[libvirt] [PATCH 0/6] use VIR_AUTO* all around qemu_driver.c

Daniel Henrique Barboza danielhb413 at gmail.com
Wed Sep 18 14:56:52 UTC 2019


I am messing a lot with qemu_driver.c and other QEMU files due
to a multifunction PCI feature I'm working on, ending up
sometimes moving code here and there, sometimes copy and
pasting parts of it, and spreading all these 'vices', namely
using char* and VIR_FREE() and virQEMUDriverConfigPtr with
virObjectUnref(), knowing that there is a better way of doing
it.

Instead of changing just the code I was working on, I took
a leap and ended up changing the whole qemu_driver.c file.
So here it is.

The changes were split to make it reviewing a bit saner. The
commiter can squash these in fewer patches if desirable.


This was done on top of master commit bc1e4389f5.

Daniel Henrique Barboza (6):
  qemu_driver: use VIR_AUTOUNREF() with virQEMUDriverConfigPtr 1/3
  qemu_driver: use VIR_AUTOUNREF() with virQEMUDriverConfigPtr 2/3
  qemu_driver: use VIR_AUTOUNREF() with virQEMUDriverConfigPtr 3/3
  qemu_driver: use VIR_AUTOFREE() with strings 1/3
  qemu_driver: use VIR_AUTOFREE() with strings 2/3
  qemu_driver: use VIR_AUTOFREE() with strings 3/3

 src/qemu/qemu_driver.c | 519 ++++++++++++++---------------------------
 1 file changed, 170 insertions(+), 349 deletions(-)

-- 
2.21.0




More information about the libvir-list mailing list