Re: [PATCH v3 04/12] nodedev: Use consistent names for driver variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[...]

> @@ -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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux