43fe83
From 308b4f4f06c3b137f3a133499c6e0fd1029aecd0 Mon Sep 17 00:00:00 2001
43fe83
Message-Id: <308b4f4f06c3b137f3a133499c6e0fd1029aecd0.1383922566.git.jdenemar@redhat.com>
43fe83
From: Peter Krempa <pkrempa@redhat.com>
43fe83
Date: Fri, 8 Nov 2013 12:33:24 +0100
43fe83
Subject: [PATCH] cpu: x86: Rename data_iterator and DATA_ITERATOR_INIT
43fe83
43fe83
https://bugzilla.redhat.com/show_bug.cgi?id=1008989
43fe83
43fe83
Use virCPUx86DataIterator and virCPUx86DataIteratorInit.
43fe83
43fe83
(cherry picked from commit 1bda29d16d3528fd257fce2fec325202c32bc9ed)
43fe83
43fe83
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
43fe83
---
43fe83
 src/cpu/cpu_x86.c | 18 +++++++++---------
43fe83
 1 file changed, 9 insertions(+), 9 deletions(-)
43fe83
43fe83
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
43fe83
index 672d6e0..93a2372 100644
43fe83
--- a/src/cpu/cpu_x86.c
43fe83
+++ b/src/cpu/cpu_x86.c
43fe83
@@ -79,14 +79,14 @@ enum compare_result {
43fe83
 };
43fe83
 
43fe83
 
43fe83
-struct data_iterator {
43fe83
+struct virCPUx86DataIterator {
43fe83
     virCPUx86Data *data;
43fe83
     int pos;
43fe83
     bool extended;
43fe83
 };
43fe83
 
43fe83
 
43fe83
-#define DATA_ITERATOR_INIT(data) \
43fe83
+#define virCPUx86DataIteratorInit(data) \
43fe83
     { data, -1, false }
43fe83
 
43fe83
 
43fe83
@@ -147,7 +147,7 @@ x86cpuidAndBits(virCPUx86CPUID *cpuid,
43fe83
 
43fe83
 /* skips all zero CPUID leafs */
43fe83
 static virCPUx86CPUID *
43fe83
-x86DataCpuidNext(struct data_iterator *iterator)
43fe83
+x86DataCpuidNext(struct virCPUx86DataIterator *iterator)
43fe83
 {
43fe83
     virCPUx86CPUID *ret;
43fe83
     virCPUx86Data *data = iterator->data;
43fe83
@@ -373,7 +373,7 @@ static void
43fe83
 x86DataIntersect(virCPUx86Data *data1,
43fe83
                  const virCPUx86Data *data2)
43fe83
 {
43fe83
-    struct data_iterator iter = DATA_ITERATOR_INIT(data1);
43fe83
+    struct virCPUx86DataIterator iter = virCPUx86DataIteratorInit(data1);
43fe83
     virCPUx86CPUID *cpuid1;
43fe83
     virCPUx86CPUID *cpuid2;
43fe83
 
43fe83
@@ -390,7 +390,7 @@ x86DataIntersect(virCPUx86Data *data1,
43fe83
 static bool
43fe83
 x86DataIsEmpty(virCPUx86Data *data)
43fe83
 {
43fe83
-    struct data_iterator iter = DATA_ITERATOR_INIT(data);
43fe83
+    struct virCPUx86DataIterator iter = virCPUx86DataIteratorInit(data);
43fe83
 
43fe83
     return x86DataCpuidNext(&iter) == NULL;
43fe83
 }
43fe83
@@ -401,7 +401,7 @@ x86DataIsSubset(const virCPUx86Data *data,
43fe83
                 const virCPUx86Data *subset)
43fe83
 {
43fe83
 
43fe83
-    struct data_iterator iter = DATA_ITERATOR_INIT((virCPUx86Data *)subset);
43fe83
+    struct virCPUx86DataIterator iter = virCPUx86DataIteratorInit((virCPUx86Data *)subset);
43fe83
     const virCPUx86CPUID *cpuid;
43fe83
     const virCPUx86CPUID *cpuidSubset;
43fe83
 
43fe83
@@ -912,8 +912,8 @@ x86ModelCompare(const struct x86_model *model1,
43fe83
                 const struct x86_model *model2)
43fe83
 {
43fe83
     enum compare_result result = EQUAL;
43fe83
-    struct data_iterator iter1 = DATA_ITERATOR_INIT(model1->data);
43fe83
-    struct data_iterator iter2 = DATA_ITERATOR_INIT(model2->data);
43fe83
+    struct virCPUx86DataIterator iter1 = virCPUx86DataIteratorInit(model1->data);
43fe83
+    struct virCPUx86DataIterator iter2 = virCPUx86DataIteratorInit(model2->data);
43fe83
     virCPUx86CPUID *cpuid1;
43fe83
     virCPUx86CPUID *cpuid2;
43fe83
 
43fe83
@@ -1139,7 +1139,7 @@ error:
43fe83
 static char *
43fe83
 x86CPUDataFormat(const virCPUData *data)
43fe83
 {
43fe83
-    struct data_iterator iter = DATA_ITERATOR_INIT(data->data.x86);
43fe83
+    struct virCPUx86DataIterator iter = virCPUx86DataIteratorInit(data->data.x86);
43fe83
     virCPUx86CPUID *cpuid;
43fe83
     virBuffer buf = VIR_BUFFER_INITIALIZER;
43fe83
 
43fe83
-- 
43fe83
1.8.4.2
43fe83