mirror of https://gitee.com/openkylin/libvirt.git
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++) {
|
||||
if (virDomainShmemDefEquals(shmem, def->shmems[i]))
|
||||
break;
|
||||
return i;
|
||||
}
|
||||
|
||||
if (i < def->nshmems)
|
||||
return i;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue