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

[libvirt] [PATCH] xenapi: Fix uninitialized variable warning



---
 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])) {
-- 
1.6.3.3


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