[libvirt] [PATCH v3 04/12] nodedev: Use consistent names for driver variables
Erik Skultety
eskultet at redhat.com
Thu Jun 29 14:06:22 UTC 2017
[...]
> @@ -506,21 +506,21 @@ static void
> dev_refresh(const char *udi)
> {
> const char *name = hal_name(udi);
> - virNodeDeviceObjPtr dev;
> + virNodeDeviceObjPtr obj;
>
> nodeDeviceLock();
> - dev = virNodeDeviceObjFindByName(&driver->devs, name);
> - if (dev) {
> + obj = virNodeDeviceObjFindByName(&driver->devs, name);
> + if (obj) {
somewhere further down the changes you went ahead and put this directly into the
if clause, so the same could be done on all the relevant places.
[...]
>
> - dev = virNodeDeviceObjFindByName(&driver->devs, def->name);
> - if (dev) {
> - virNodeDeviceObjUnlock(dev);
> + obj = virNodeDeviceObjFindByName(&driver->devs, def->name);
> + if (obj) {
Here as well.
[...]
> - if (dev == NULL)
> + obj = virNodeDeviceObjAssignDef(&driver->devs, def);
> + if (obj == NULL)
Here as well.
ACK
Erik
More information about the libvir-list
mailing list