[libvirt] [PATCH 4/9] storage: Create matchPoolSourceHost

Peter Krempa pkrempa at redhat.com
Mon Apr 13 10:18:27 UTC 2015


On Thu, Apr 02, 2015 at 13:39:41 -0400, John Ferlan wrote:
> Split out the nhost == 1 and hosts[0].name logic into a separate routine
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  src/conf/storage_conf.c | 17 ++++++++++++-----
>  1 file changed, 12 insertions(+), 5 deletions(-)
> 
> diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
> index e4cb54b..b3e930b 100644
> --- a/src/conf/storage_conf.c
> +++ b/src/conf/storage_conf.c
> @@ -2290,6 +2290,17 @@ matchSCSIAdapterParent(virStoragePoolObjPtr pool,
>      return false;
>  }
>  
> +static bool
> +matchPoolSourceHost(virStoragePoolSourcePtr poolsrc,

Same compliant for the function name as in 1/9.

> +                    virStoragePoolSourcePtr defsrc)
> +{
> +    /* NB: nhost cannot be > 1 */
> +    if (poolsrc->nhost == 0 || defsrc->nhost == 0)
> +        return false;

And this condition can be made explicitly state the same without the
need for the comment.

ACK with the name and condition changed.

Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150413/53699048/attachment-0001.sig>


More information about the libvir-list mailing list