• E
    build: avoid useless virAsprintf · 25ae3d30
    Eric Blake 提交于
    virAsprintf(&foo, "%s", bar) is wasteful compared to
    foo = strdup(bar) (or eventually, VIR_STRDUP(foo, bar),
    but one thing at a time...).
    
    Noticed while reviewing Laine's attempt to clean up broken
    qemu:///session.
    
    * cfg.mk (sc_prohibit_asprintf): Enhance rule.
    * src/esx/esx_storage_backend_vmfs.c
    (esxStorageBackendVMFSVolumeLookupByKey): Fix offender.
    * src/network/bridge_driver.c (networkStateInitialize): Likewise.
    * src/nwfilter/nwfilter_dhcpsnoop.c (virNWFilterSnoopDHCPOpen):
    Likewise.
    * src/storage/storage_backend_sheepdog.c
    (virStorageBackendSheepdogRefreshVol): Likewise.
    * src/util/vircgroup.c (virCgroupAddTaskStrController): Likewise.
    * src/util/virdnsmasq.c (addnhostsAdd): Likewise.
    * src/xen/block_stats.c (xenLinuxDomainDeviceID): Likewise.
    * src/xen/xen_driver.c (xenUnifiedConnectOpen): Likewise.
    * tools/virsh.c (vshGetTypedParamValue): Likewise.
    Signed-off-by: NEric Blake <eblake@redhat.com>
    25ae3d30
virdnsmasq.c 20.5 KB