docs: replace ARRAY_CARDINALITY with G_N_ELEMENTS

Fix docs illustrating call with an obsolete macro.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2022-05-24 13:25:55 +01:00
parent 497d8555c4
commit c748000cd1

View File

@ -127,7 +127,7 @@ locks, this will be done from the libvirtd process.
}; };
mgr = virLockManagerNew(lockPlugin, mgr = virLockManagerNew(lockPlugin,
VIR_LOCK_MANAGER_TYPE_DOMAIN, VIR_LOCK_MANAGER_TYPE_DOMAIN,
ARRAY_CARDINALITY(params), G_N_ELEMENTS(params),
params, params,
0))); 0)));
@ -171,7 +171,7 @@ however, a process may voluntarily give up the lock by running
}; };
mgr = virLockManagerNew(lockPlugin, mgr = virLockManagerNew(lockPlugin,
VIR_LOCK_MANAGER_TYPE_DOMAIN, VIR_LOCK_MANAGER_TYPE_DOMAIN,
ARRAY_CARDINALITY(params), G_N_ELEMENTS(params),
params, params,
0))); 0)));