mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03: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,
|
||||
const void *opaque)
|
||||
{
|
||||
g_autofree char *addr = NULL;
|
||||
bool want = false;
|
||||
VIR_LOCK_GUARD lock = virObjectLockGuard(obj);
|
||||
g_autofree char *addr = nodeDeviceObjFormatAddress(obj);
|
||||
|
||||
virObjectLock(obj);
|
||||
addr = nodeDeviceObjFormatAddress(obj);
|
||||
want = STREQ_NULLABLE(addr, opaque);
|
||||
virObjectUnlock(obj);
|
||||
return want;
|
||||
return STREQ_NULLABLE(addr, opaque);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user