]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
cpu_x86: Move x86FeatureFind* to avoid forward prototypes
authorJiri Denemark <jdenemar@redhat.com>
Tue, 26 Sep 2017 12:52:34 +0000 (14:52 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Mon, 16 Oct 2017 07:23:20 +0000 (09:23 +0200)
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/cpu/cpu_x86.c

index 84ec878d1be2f6aaccef7324ee5acc426f41951b..8dff333e13d94e47a82750c036f7af543cf7da0c 100644 (file)
@@ -240,6 +240,37 @@ x86cpuidAndBits(virCPUx86CPUID *cpuid,
     cpuid->edx &= mask->edx;
 }
 
+
+static virCPUx86FeaturePtr
+x86FeatureFind(virCPUx86MapPtr map,
+               const char *name)
+{
+    size_t i;
+
+    for (i = 0; i < map->nfeatures; i++) {
+        if (STREQ(map->features[i]->name, name))
+            return map->features[i];
+    }
+
+    return NULL;
+}
+
+
+static virCPUx86FeaturePtr
+x86FeatureFindInternal(const char *name)
+{
+    size_t i;
+    size_t count = ARRAY_CARDINALITY(x86_kvm_features);
+
+    for (i = 0; i < count; i++) {
+        if (STREQ(x86_kvm_features[i].name, name))
+            return x86_kvm_features + i;
+    }
+
+    return NULL;
+}
+
+
 static int
 virCPUx86CPUIDSorter(const void *a, const void *b)
 {
@@ -753,36 +784,6 @@ x86FeatureFree(virCPUx86FeaturePtr feature)
 }
 
 
-static virCPUx86FeaturePtr
-x86FeatureFind(virCPUx86MapPtr map,
-               const char *name)
-{
-    size_t i;
-
-    for (i = 0; i < map->nfeatures; i++) {
-        if (STREQ(map->features[i]->name, name))
-            return map->features[i];
-    }
-
-    return NULL;
-}
-
-
-static virCPUx86FeaturePtr
-x86FeatureFindInternal(const char *name)
-{
-    size_t i;
-    size_t count = ARRAY_CARDINALITY(x86_kvm_features);
-
-    for (i = 0; i < count; i++) {
-        if (STREQ(x86_kvm_features[i].name, name))
-            return x86_kvm_features + i;
-    }
-
-    return NULL;
-}
-
-
 static int
 x86FeatureInData(const char *name,
                  const virCPUx86Data *data,