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

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



[...]

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


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