[libvirt] [PATCH 07/19] storage: Use consistent variable names in virstorageobj

John Ferlan jferlan at redhat.com
Thu Jul 13 21:49:35 UTC 2017



On 07/12/2017 04:17 AM, Pavel Hrdina wrote:
> On Tue, May 09, 2017 at 11:30:14AM -0400, John Ferlan wrote:
>> A virStoragePoolObjPtr will be an 'obj'.
>>
>> A virStoragePoolPtr will be a 'pool'.
> 
> There is no such change in this commit.
> 

Simple enough to remove.

>>
>> NB: Also modify the @matchpool to @matchobj.
>> Signed-off-by: John Ferlan <jferlan at redhat.com>
>> ---
>>  src/conf/virstorageobj.c | 342 +++++++++++++++++++++++------------------------
>>  src/conf/virstorageobj.h |  20 +--
>>  2 files changed, 180 insertions(+), 182 deletions(-)
>>
>> diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c
>> index dd41701..74a9c67 100644
>> --- a/src/conf/virstorageobj.c
>> +++ b/src/conf/virstorageobj.c
>> @@ -70,15 +70,15 @@ virStoragePoolObjListFree(virStoragePoolObjListPtr pools)
>>  
>>  void
>>  virStoragePoolObjRemove(virStoragePoolObjListPtr pools,
>> -                        virStoragePoolObjPtr pool)
>> +                        virStoragePoolObjPtr obj)
> 
> This is why I'm not a fan of this change, to make the code consistent
> we should also rename "pools" to "objs" which I don't like so probably
> "objList" or something else.
> 
> Pavel
> 

I understand the objections and I agree @pools could be something
else... Similarly @devs, @nwfilters, @secrets, @interfaces, etc.

The difference between @pools and @pool/@obj is the usage of @pool/@obj
wasn't consistent.  At least there's only one @pools - OK, well two one
in _virStorageDriverState and one in _testDriver.

I guess that's the line I didn't cross.

John




More information about the libvir-list mailing list