[libvirt] [PATCH] xenapi: Fix uninitialized variable warning
Matthias Bolte
matthias.bolte at googlemail.com
Sun Apr 4 14:14:23 UTC 2010
2010/4/4 Laine Stump <laine at laine.org>:
> On 04/03/2010 07:30 PM, Matthias Bolte wrote:
>>
>> ---
>> src/xenapi/xenapi_utils.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/src/xenapi/xenapi_utils.c b/src/xenapi/xenapi_utils.c
>> index 581bd90..4eb17fa 100644
>> --- a/src/xenapi/xenapi_utils.c
>> +++ b/src/xenapi/xenapi_utils.c
>> @@ -405,7 +405,7 @@ createVifNetwork (virConnectPtr conn, xen_vm vm, char
>> *device,
>> vm_opt->u.handle = xvm;
>> xen_network_set *net_set = NULL;
>> xen_network_record *net_rec = NULL;
>> - int cnt;
>> + int cnt = 0;
>> if (xen_network_get_all(session,&net_set)) {
>> for(cnt = 0; cnt< net_set->size; cnt++) {
>> if (xen_network_get_record(session,&net_rec,
>> net_set->contents[cnt])) {
>>
>
> ACK. I guess xen_network_get_all() had never before returned false?
>
Thanks, pushed.
Matthias
More information about the libvir-list
mailing list