mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 11:31:16 +00:00
node_device_driver: Use automatic mutex management
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
1e4d85af32
commit
29bb566a22
@ -1072,14 +1072,10 @@ static bool
|
|||||||
matchDeviceAddress(virNodeDeviceObj *obj,
|
matchDeviceAddress(virNodeDeviceObj *obj,
|
||||||
const void *opaque)
|
const void *opaque)
|
||||||
{
|
{
|
||||||
g_autofree char *addr = NULL;
|
VIR_LOCK_GUARD lock = virObjectLockGuard(obj);
|
||||||
bool want = false;
|
g_autofree char *addr = nodeDeviceObjFormatAddress(obj);
|
||||||
|
|
||||||
virObjectLock(obj);
|
return STREQ_NULLABLE(addr, opaque);
|
||||||
addr = nodeDeviceObjFormatAddress(obj);
|
|
||||||
want = STREQ_NULLABLE(addr, opaque);
|
|
||||||
virObjectUnlock(obj);
|
|
||||||
return want;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user