[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 2/6] net: Change argument type of virNetworkObjIsDuplicate()



On 10/25/2012 11:18 AM, Peter Krempa wrote:
> The argument check_active is used only as a boolean so this patch
> changes the type and updates callers.
> ---
>  src/conf/network_conf.c     | 2 +-
>  src/conf/network_conf.h     | 2 +-
>  src/network/bridge_driver.c | 4 ++--
>  3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
> index 93d1b4c..8a3cc75 100644
> --- a/src/conf/network_conf.c
> +++ b/src/conf/network_conf.c
> @@ -3056,7 +3056,7 @@ cleanup:
>  int
>  virNetworkObjIsDuplicate(virNetworkObjListPtr doms,
>                           virNetworkDefPtr def,
> -                         unsigned int check_active)
> +                         bool check_active)
>  {
>      int ret = -1;
>      int dupVM = 0;
> diff --git a/src/conf/network_conf.h b/src/conf/network_conf.h
> index 4c0c8c1..3e46304 100644
> --- a/src/conf/network_conf.h
> +++ b/src/conf/network_conf.h
> @@ -337,7 +337,7 @@ virNetworkObjUpdate(virNetworkObjPtr obj,
>
>  int virNetworkObjIsDuplicate(virNetworkObjListPtr doms,
>                               virNetworkDefPtr def,
> -                             unsigned int check_active);
> +                             bool check_active);
>
>  void virNetworkObjLock(virNetworkObjPtr obj);
>  void virNetworkObjUnlock(virNetworkObjPtr obj);
> diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
> index 8837843..43a5540 100644
> --- a/src/network/bridge_driver.c
> +++ b/src/network/bridge_driver.c
> @@ -2672,7 +2672,7 @@ static virNetworkPtr networkCreate(virConnectPtr conn, const char *xml) {
>      if (!(def = virNetworkDefParseString(xml)))
>          goto cleanup;
>
> -    if (virNetworkObjIsDuplicate(&driver->networks, def, 1) < 0)
> +    if (virNetworkObjIsDuplicate(&driver->networks, def, true) < 0)
>          goto cleanup;
>
>      /* Only the three L3 network types that are configured by libvirt
> @@ -2731,7 +2731,7 @@ static virNetworkPtr networkDefine(virConnectPtr conn, const char *xml) {
>      if (!(def = virNetworkDefParseString(xml)))
>          goto cleanup;
>
> -    if (virNetworkObjIsDuplicate(&driver->networks, def, 0) < 0)
> +    if (virNetworkObjIsDuplicate(&driver->networks, def, false) < 0)
>          goto cleanup;
>
>      /* Only the three L3 network types that are configured by libvirt

Trivial. ACK.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]