[libvirt] [PATCH v2 17/20] network: Use @maxnames instead of @nnames

Michal Privoznik mprivozn at redhat.com
Tue Aug 15 15:32:29 UTC 2017


On 07/26/2017 05:05 PM, John Ferlan wrote:
> To be consistent with the API definition, use the @maxnames instead
> of @nnames when describing/comparing against the maximum names to
> be provided for the *ConnectList[Defined]Networks APIs.
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  src/conf/virnetworkobj.c    | 10 +++++-----
>  src/conf/virnetworkobj.h    |  2 +-
>  src/network/bridge_driver.c |  8 ++++----
>  src/test/test_driver.c      |  8 ++++----
>  4 files changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/src/conf/virnetworkobj.c b/src/conf/virnetworkobj.c
> index 43fc2cf..d288dd0 100644
> --- a/src/conf/virnetworkobj.c
> +++ b/src/conf/virnetworkobj.c
> @@ -1438,7 +1438,7 @@ struct virNetworkObjListGetHelperData {
>      virConnectPtr conn;
>      virNetworkObjListFilter filter;
>      char **names;
> -    int nnames;
> +    int maxnames;
>      bool active;
>      int got;
>      bool error;

Correct. @nnames may suggest there's @nnames items in @names array.
However, there's @got items! Very confusing.

Michal




More information about the libvir-list mailing list