virCapabilitiesHostNUMAFormat: Swap order of arguments

The rest of virCapabilities format functions take virBuffer as
the first argument and struct to format as the second. Also, they
accept NULL (as the second argument). Fix
virCapabilitiesHostNUMAFormat() so that it follows this logic.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Michal Privoznik 2021-05-03 15:25:19 +02:00
parent 4ce1106277
commit c2137a901c

View File

@ -794,13 +794,16 @@ virCapabilitiesAddStoragePool(virCaps *caps,
static int
virCapabilitiesHostNUMAFormat(virCapsHostNUMA *caps,
virBuffer *buf)
virCapabilitiesHostNUMAFormat(virBuffer *buf,
virCapsHostNUMA *caps)
{
size_t i;
size_t j;
char *siblings;
if (!caps)
return 0;
virBufferAddLit(buf, "<topology>\n");
virBufferAdjustIndent(buf, 2);
virBufferAsprintf(buf, "<cells num='%d'>\n", caps->cells->len);
@ -1125,8 +1128,7 @@ virCapabilitiesFormatHostXML(virCapsHost *host,
virBufferAsprintf(buf, "<netprefix>%s</netprefix>\n",
host->netprefix);
if (host->numa &&
virCapabilitiesHostNUMAFormat(host->numa, buf) < 0)
if (virCapabilitiesHostNUMAFormat(buf, host->numa) < 0)
return -1;
if (virCapabilitiesFormatCaches(buf, &host->cache) < 0)