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

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

 



On 08/15/2017 10:50 PM, John Ferlan wrote:
> 
> 
> On 08/15/2017 11:32 AM, Michal Privoznik wrote:
>> 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@xxxxxxxxxx>
>>> ---
>>>  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.
> 
> True, changing @got to @nnames fixes that though...  and of course
> moving it closer to char **names;... and yet another reason why all this
> has been "confusing" thus far...  Would you like to see that patch or is
> there enough trust that I know how to do that safely ;-).

That is a next step. After you merge this one. Therefore I suggest you
merge this one and send a separate patch that renames @got to nnames.

Michal

--
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]
  Powered by Linux