mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
qemuBuildSmpCommandLine: use virCommandAddArgBuffer directly
Instead of getting the string then passing it to virCommand. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
6e61843d07
commit
d804bde82b
@ -7556,7 +7556,6 @@ static int
|
||||
qemuBuildSmpCommandLine(virCommandPtr cmd,
|
||||
virDomainDefPtr def)
|
||||
{
|
||||
char *smp = NULL;
|
||||
VIR_AUTOCLEAN(virBuffer) buf = VIR_BUFFER_INITIALIZER;
|
||||
unsigned int maxvcpus = virDomainDefGetVcpusMax(def);
|
||||
unsigned int nvcpus = 0;
|
||||
@ -7592,10 +7591,7 @@ qemuBuildSmpCommandLine(virCommandPtr cmd,
|
||||
if (virBufferCheckError(&buf) < 0)
|
||||
return -1;
|
||||
|
||||
smp = virBufferContentAndReset(&buf);
|
||||
virCommandAddArg(cmd, smp);
|
||||
VIR_FREE(smp);
|
||||
|
||||
virCommandAddArgBuffer(cmd, &buf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user