virCapabilitiesHostNUMAAddCell: Take double pointer

What this function really does it takes ownership of all pointers
passed (well, except for the first one - caps - to which it
registers new NUMA node). But since all info is passed as a
single pointer it's hard to tell (and use g_auto*). Let's use
double pointers to make the ownership transfer obvious.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Michal Privoznik
2021-04-29 18:58:40 +02:00
parent 26a24a702c
commit 83253ff091
5 changed files with 36 additions and 30 deletions

View File

@@ -329,8 +329,9 @@ testBuildCapabilities(virConnectPtr conn)
virCapabilitiesHostNUMAAddCell(caps->host.numa,
i, privconn->cells[i].mem,
privconn->cells[i].numCpus,
cpu_cells, 0, NULL, nPages, pages);
privconn->cells[i].numCpus, &cpu_cells,
0, NULL,
nPages, &pages);
}
for (i = 0; i < G_N_ELEMENTS(guest_types); i++) {