[...] > @@ -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 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list