Re: [PATCH 12/24] maint: improve VIR_ERR_INVALID_DOMAIN usage

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

 



On 01/02/2014 04:47 PM, John Ferlan wrote:
> 
> 
> On 12/28/2013 11:11 AM, Eric Blake wrote:
>> In datatype.c, virGetDomainSnapshot could result in the message:
>>
>> error: invalid domain pointer in bad domain
>>
>> Furthermore, while there are a few functions in libvirt.c that
>> only care about a virDomainPtr without regards to the connection
>> (such as virDomainGetName), most functions also require a valid
>> connection.  Yet several functions were blindly derefencing the

I'll fix that typo while at it.

>> After this patch, all places that validate a domain consistently
>> report:
>>
>> error: invalid domain pointer in someFunc
>>
>> * src/datatypes.h (virCheckDomainReturn, virCheckDomainGoto): New
>> macros.
>> * src/datatypes.c (virGetDomainSnapshot): Use new macro.
>> (virLibConnError): Delete unused macro.
>>
>> Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
>> ---
>>  po/POTFILES.in     |    1 -
>>  src/datatypes.c    |   18 +-
>>  src/datatypes.h    |   23 ++
>>  src/libvirt-lxc.c  |   11 +-
>>  src/libvirt-qemu.c |   18 +-
>>  src/libvirt.c      | 1055 +++++++++++++---------------------------------------
>>  6 files changed, 284 insertions(+), 842 deletions(-)
>>
> 
> ACK
> 
> I was going to point out a couple patches ago about the usage of
> domain->conn->flags in a call followed by a conn = domain->conn and then
> usage of conn-> afterwards, but figured it'd be cleared up soon
> enough... It was! :-)

Now pushed.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]