qemu: remove unnecessary virBufferFreeAndReset() after virCommandAddArgBuffer()

The latter function is guaranteed to always clear out the virBuffer
anyway, so this is redundant and could add to extra cargo-cult code if
used as an example.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Laine Stump 2020-07-04 17:45:57 -04:00
parent f7e3610095
commit d30cfe70ef

View File

@ -9080,7 +9080,6 @@ qemuBuldDomainLoaderPflashCommandLine(virCommandPtr cmd,
virCommandAddArgBuffer(cmd, &buf);
if (loader->nvram) {
virBufferFreeAndReset(&buf);
virBufferAddLit(&buf, "file=");
virQEMUBuildBufferEscapeComma(&buf, loader->nvram);
virBufferAsprintf(&buf, ",if=pflash,format=raw,unit=%d", unit);