mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 05:25:18 +00:00
conf: Don't complicate find loop
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
ae612493ff
commit
d7107959c3
@ -14898,12 +14898,9 @@ virDomainShmemDefFind(virDomainDefPtr def,
|
|||||||
|
|
||||||
for (i = 0; i < def->nshmems; i++) {
|
for (i = 0; i < def->nshmems; i++) {
|
||||||
if (virDomainShmemDefEquals(shmem, def->shmems[i]))
|
if (virDomainShmemDefEquals(shmem, def->shmems[i]))
|
||||||
break;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i < def->nshmems)
|
|
||||||
return i;
|
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user