diff options
author | Eric Blake <eblake@redhat.com> | 2011-04-14 13:27:47 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2011-04-15 15:26:26 -0600 |
commit | dbe3bad98788e11bd304c4aa42e1ab2ac1433b92 (patch) | |
tree | 9713f38cd08516079a1a05d6f020f576b6ded323 /src/security | |
parent | esx: Fix gcc 4.6 warning about initialized but unused variables (diff) | |
download | libvirt-dbe3bad98788e11bd304c4aa42e1ab2ac1433b92.tar.gz libvirt-dbe3bad98788e11bd304c4aa42e1ab2ac1433b92.tar.bz2 libvirt-dbe3bad98788e11bd304c4aa42e1ab2ac1433b92.zip |
maint: use lighter-weight function for straight appends
It costs quite a few processor cycles to go through printf parsing
just to determine that we only meant to append.
* src/xen/xend_internal.c (xend_op_ext): Consolidate multiple
printfs into one.
* src/qemu/qemu_command.c (qemuBuildWatchdogDevStr)
(qemuBuildUSBInputDevStr, qemuBuildSoundDevStr)
(qemuBuildSoundCodecStr, qemuBuildVideoDevStr): Likewise.
(qemuBuildCpuArgStr, qemuBuildCommandLine): Prefer virBufferAdd
over virBufferVsprintf for trivial appends.
* src/phyp/phyp_driver.c (phypExec, phypUUIDTable_Push)
(phypUUIDTable_Pull): Likewise.
* src/conf/nwfilter_conf.c (macProtocolIDFormatter)
(arpOpcodeFormatter, formatIPProtocolID, printStringItems)
(virNWFilterPrintStateMatchFlags, virNWIPAddressFormat)
(virNWFilterDefFormat): Likewise.
* src/security/virt-aa-helper.c (main): Likewise.
* src/util/sexpr.c (sexpr2string): Likewise.
* src/xenxs/xen_sxpr.c (xenFormatSxprChr): Likewise.
* src/xenxs/xen_xm.c (xenFormatXMDisk): Likewise.
Diffstat (limited to 'src/security')
-rw-r--r-- | src/security/virt-aa-helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index bb716e6db..08ff53c30 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -1204,7 +1204,7 @@ main(int argc, char **argv) virBufferVSprintf(&buf, " \"%s/run/libvirt/**/%s.pid\" rwk,\n", LOCALSTATEDIR, ctl->def->name); if (ctl->files) - virBufferVSprintf(&buf, "%s", ctl->files); + virBufferAdd(&buf, ctl->files, -1); } if (virBufferError(&buf)) { |