[libvirt] bug in libvirt.c?

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

 



 for (i = 0; i < virNetworkDriverTabCount; i++) {
                if ((virDriverTab[i]->probe != NULL) &&
                    ((latest = virDriverTab[i]->probe()) != NULL)) {
                    probes++;

                 .....
                }
 }

We use array virDriverTab, but cicle is to virNetworkDriverTabCount which count number of virNetworkDriverTab drivers.
I think virDriverTabCount should be used.


Index: libvirt.c
===================================================================
RCS file: /data/cvs/libvirt/src/libvirt.c,v
retrieving revision 1.147
diff -u -p -r1.147 libvirt.c
--- libvirt.c   26 Jun 2008 09:37:51 -0000      1.147
+++ libvirt.c   10 Jul 2008 14:48:44 -0000
@@ -699,7 +699,7 @@ do_open (const char *name,
             const char *use = NULL;
             const char *latest;
             int probes = 0;
-            for (i = 0; i < virNetworkDriverTabCount; i++) {
+            for (i = 0; i < virDriverTabCount; i++) {
                 if ((virDriverTab[i]->probe != NULL) &&
                     ((latest = virDriverTab[i]->probe()) != NULL)) {
                     probes++;

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