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

@@ -935,9 +935,9 @@ virTestCapsBuildNUMATopology(int seq)
virCapabilitiesHostNUMAAddCell(caps, cell_id + seq,
MAX_MEM_IN_CELL,
MAX_CPUS_IN_CELL, cell_cpus,
VIR_ARCH_NONE, NULL,
VIR_ARCH_NONE, NULL);
MAX_CPUS_IN_CELL, &cell_cpus,
0, NULL,
0, NULL);
cell_cpus = NULL;
}