Blob Blame History Raw
From 308b4f4f06c3b137f3a133499c6e0fd1029aecd0 Mon Sep 17 00:00:00 2001
Message-Id: <308b4f4f06c3b137f3a133499c6e0fd1029aecd0.1383922566.git.jdenemar@redhat.com>
From: Peter Krempa <pkrempa@redhat.com>
Date: Fri, 8 Nov 2013 12:33:24 +0100
Subject: [PATCH] cpu: x86: Rename data_iterator and DATA_ITERATOR_INIT

https://bugzilla.redhat.com/show_bug.cgi?id=1008989

Use virCPUx86DataIterator and virCPUx86DataIteratorInit.

(cherry picked from commit 1bda29d16d3528fd257fce2fec325202c32bc9ed)

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/cpu/cpu_x86.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index 672d6e0..93a2372 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -79,14 +79,14 @@ enum compare_result {
 };
 
 
-struct data_iterator {
+struct virCPUx86DataIterator {
     virCPUx86Data *data;
     int pos;
     bool extended;
 };
 
 
-#define DATA_ITERATOR_INIT(data) \
+#define virCPUx86DataIteratorInit(data) \
     { data, -1, false }
 
 
@@ -147,7 +147,7 @@ x86cpuidAndBits(virCPUx86CPUID *cpuid,
 
 /* skips all zero CPUID leafs */
 static virCPUx86CPUID *
-x86DataCpuidNext(struct data_iterator *iterator)
+x86DataCpuidNext(struct virCPUx86DataIterator *iterator)
 {
     virCPUx86CPUID *ret;
     virCPUx86Data *data = iterator->data;
@@ -373,7 +373,7 @@ static void
 x86DataIntersect(virCPUx86Data *data1,
                  const virCPUx86Data *data2)
 {
-    struct data_iterator iter = DATA_ITERATOR_INIT(data1);
+    struct virCPUx86DataIterator iter = virCPUx86DataIteratorInit(data1);
     virCPUx86CPUID *cpuid1;
     virCPUx86CPUID *cpuid2;
 
@@ -390,7 +390,7 @@ x86DataIntersect(virCPUx86Data *data1,
 static bool
 x86DataIsEmpty(virCPUx86Data *data)
 {
-    struct data_iterator iter = DATA_ITERATOR_INIT(data);
+    struct virCPUx86DataIterator iter = virCPUx86DataIteratorInit(data);
 
     return x86DataCpuidNext(&iter) == NULL;
 }
@@ -401,7 +401,7 @@ x86DataIsSubset(const virCPUx86Data *data,
                 const virCPUx86Data *subset)
 {
 
-    struct data_iterator iter = DATA_ITERATOR_INIT((virCPUx86Data *)subset);
+    struct virCPUx86DataIterator iter = virCPUx86DataIteratorInit((virCPUx86Data *)subset);
     const virCPUx86CPUID *cpuid;
     const virCPUx86CPUID *cpuidSubset;
 
@@ -912,8 +912,8 @@ x86ModelCompare(const struct x86_model *model1,
                 const struct x86_model *model2)
 {
     enum compare_result result = EQUAL;
-    struct data_iterator iter1 = DATA_ITERATOR_INIT(model1->data);
-    struct data_iterator iter2 = DATA_ITERATOR_INIT(model2->data);
+    struct virCPUx86DataIterator iter1 = virCPUx86DataIteratorInit(model1->data);
+    struct virCPUx86DataIterator iter2 = virCPUx86DataIteratorInit(model2->data);
     virCPUx86CPUID *cpuid1;
     virCPUx86CPUID *cpuid2;
 
@@ -1139,7 +1139,7 @@ error:
 static char *
 x86CPUDataFormat(const virCPUData *data)
 {
-    struct data_iterator iter = DATA_ITERATOR_INIT(data->data.x86);
+    struct virCPUx86DataIterator iter = virCPUx86DataIteratorInit(data->data.x86);
     virCPUx86CPUID *cpuid;
     virBuffer buf = VIR_BUFFER_INITIALIZER;
 
-- 
1.8.4.2