[PATCH 2/7] hypervCreateEmbeddedParam: Don't count elements needlessly

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

 



'count' is not used after calculating it.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/hyperv/hyperv_wmi.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c
index dc2c6471ab..e211fd5d80 100644
--- a/src/hyperv/hyperv_wmi.c
+++ b/src/hyperv/hyperv_wmi.c
@@ -274,16 +274,11 @@ GHashTable *
 hypervCreateEmbeddedParam(hypervWmiClassInfo *classInfo)
 {
     size_t i;
-    size_t count;
     g_autoptr(GHashTable) table = virHashNew(NULL);
     XmlSerializerInfo *typeinfo = NULL;

     typeinfo = classInfo->serializerInfo;

-    /* loop through the items to find out how many fields there are */
-    for (count = 0; typeinfo[count].name != NULL; count++)
-        ;
-
     for (i = 0; typeinfo[i].name != NULL; i++) {
         XmlSerializerInfo *item = &typeinfo[i];

-- 
2.31.1




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

  Powered by Linux