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
+2 -2
View File
@@ -340,7 +340,7 @@ static int testCreateNetwork(const void *opaque G_GNUC_UNUSED)
int nicindexes[] = {
2, 1729, 87539319,
};
size_t nnicindexes = ARRAY_CARDINALITY(nicindexes);
size_t nnicindexes = G_N_ELEMENTS(nicindexes);
if (virSystemdCreateMachine("demo",
"lxc",
uuid,
@@ -586,7 +586,7 @@ testActivation(bool useNames)
map[1].family = AF_INET;
map[1].port = virNetSocketGetPort(sockIP[0]);
if (virSystemdGetActivation(map, ARRAY_CARDINALITY(map), &act) < 0)
if (virSystemdGetActivation(map, G_N_ELEMENTS(map), &act) < 0)
goto cleanup;
if (act == NULL) {