Use G_N_ELEMENTS instead of ARRAY_CARDINALITY

Prefer the GLib version of the macro.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Ján Tomko
2019-10-15 16:14:19 +02:00
parent d99f17a502
commit 67e72053c1
110 changed files with 324 additions and 319 deletions
+4 -4
View File
@@ -43,8 +43,8 @@ static virCPUDef cpuDefaultData = {
.sockets = 1,
.cores = 2,
.threads = 1,
.nfeatures = ARRAY_CARDINALITY(cpuDefaultFeatures),
.nfeatures_max = ARRAY_CARDINALITY(cpuDefaultFeatures),
.nfeatures = G_N_ELEMENTS(cpuDefaultFeatures),
.nfeatures_max = G_N_ELEMENTS(cpuDefaultFeatures),
.features = cpuDefaultFeatures,
};
@@ -82,8 +82,8 @@ static virCPUDef cpuHaswellData = {
.sockets = 1,
.cores = 2,
.threads = 2,
.nfeatures = ARRAY_CARDINALITY(cpuHaswellFeatures),
.nfeatures_max = ARRAY_CARDINALITY(cpuHaswellFeatures),
.nfeatures = G_N_ELEMENTS(cpuHaswellFeatures),
.nfeatures_max = G_N_ELEMENTS(cpuHaswellFeatures),
.features = cpuHaswellFeatures,
};