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

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

 



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.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]