conf: Don't complicate find loop

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2016-10-07 15:56:40 +02:00
parent ae612493ff
commit d7107959c3
1 changed files with 1 additions and 4 deletions

View File

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