mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user