]> xenbits.xensource.com Git - libvirt.git/commitdiff
cpu: use typedefs for enums in "src/cpu/cpu_map.h"
authorJulio Faracco <jcfaracco@gmail.com>
Sun, 1 Jun 2014 00:22:28 +0000 (21:22 -0300)
committerEric Blake <eblake@redhat.com>
Mon, 2 Jun 2014 21:15:05 +0000 (15:15 -0600)
In "src/cpu/" there are some enumerations (enum) declarations.
Similar to the recent cleanup to "src/util", "src/conf" and other
directories, it's better to use a typedef for variable types,
function types and other usages. Other enumeration and folders will
be changed to typedef's in the future. Specially, in files that are
in different places of "src/util" and "src/conf". Most of the files
changed in this commit are related to CPU (cpu_map.h) enums.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
src/cpu/cpu.c
src/cpu/cpu_map.c
src/cpu/cpu_map.h
src/cpu/cpu_powerpc.c
src/cpu/cpu_x86.c

index 528e1a7e8df88b7593c55fbe463ece30146bf201..c3d66dd374daf15fafb7e6af6d539b9673f4ba82 100644 (file)
@@ -729,7 +729,7 @@ struct cpuGetModelsData
 };
 
 static int
-cpuGetArchModelsCb(enum cpuMapElement element,
+cpuGetArchModelsCb(cpuMapElement element,
                    xmlXPathContextPtr ctxt,
                    void *cbdata)
 {
index 68d287a98c522e50f52abb3d7313e12b2f179592..4706f673940855a5e574a5c278c478c30144afe0 100644 (file)
@@ -42,7 +42,7 @@ VIR_ENUM_IMPL(cpuMapElement, CPU_MAP_ELEMENT_LAST,
 
 
 static int load(xmlXPathContextPtr ctxt,
-                enum cpuMapElement element,
+                cpuMapElement element,
                 cpuMapLoadCallback callback,
                 void *data)
 {
index 23ce888f309772c76580ce081bb6a70cacf3502f..fcd6c34d63d22cff531bbd77fb42a1e1104ae3e3 100644 (file)
 # include "virxml.h"
 
 
-enum cpuMapElement {
+typedef enum {
     CPU_MAP_ELEMENT_VENDOR,
     CPU_MAP_ELEMENT_FEATURE,
     CPU_MAP_ELEMENT_MODEL,
 
     CPU_MAP_ELEMENT_LAST
-};
+} cpuMapElement;
 
 VIR_ENUM_DECL(cpuMapElement)
 
 
 typedef int
-(*cpuMapLoadCallback)  (enum cpuMapElement element,
+(*cpuMapLoadCallback)  (cpuMapElement element,
                         xmlXPathContextPtr ctxt,
                         void *data);
 
index 372272f364cbff93cfbb91885020494ebbdc5f7a..05fa55b88fbec39469386522bc505c452988316f 100644 (file)
@@ -273,7 +273,7 @@ ppcModelLoad(xmlXPathContextPtr ctxt,
 }
 
 static int
-ppcMapLoadCallback(enum cpuMapElement element,
+ppcMapLoadCallback(cpuMapElement element,
                    xmlXPathContextPtr ctxt,
                    void *data)
 {
index 06fbfba7b5017289988e24a45b34f7399fa6a5f6..72c5216f012dac09edbefdf5b194f1247ed3aff5 100644 (file)
@@ -1098,7 +1098,7 @@ x86MapFree(struct x86_map *map)
 
 
 static int
-x86MapLoadCallback(enum cpuMapElement element,
+x86MapLoadCallback(cpuMapElement element,
                    xmlXPathContextPtr ctxt,
                    void *data)
 {