• E
    maint: use lighter-weight function for straight appends · dbe3bad9
    Eric Blake 提交于
    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.
    dbe3bad9
virt-aa-helper.c 35.1 KB