[libvirt] [PATCH 1/8] conf: Fix virDomainShmemDefFind
John Ferlan
jferlan at redhat.com
Fri Oct 7 13:37:26 UTC 2016
On 09/27/2016 08:24 AM, Martin Kletzander wrote:
> Due to the switch of parameters in a call to virDomainShmemDefEquals()
> no device was found when looking for device with all the information
> except address. Also fix the indentation.
>
> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
> ---
> src/conf/domain_conf.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
ACK - while you're here... instead of 'break;', just return i; and don't
forget to remove the if (i < def->nshmems) return i;
You can make it a separate patch and assume the ACK...
John
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index a06da46fabe4..dbf6eca57153 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -14858,8 +14858,8 @@ virDomainShmemDefFind(virDomainDefPtr def,
> size_t i;
>
> for (i = 0; i < def->nshmems; i++) {
> - if (virDomainShmemDefEquals(def->shmems[i], shmem))
> - break;
> + if (virDomainShmemDefEquals(shmem, def->shmems[i]))
> + break;
> }
>
> if (i < def->nshmems)
>
More information about the libvir-list
mailing list