replace snprintf with strlcpy without adding extra include
authorBruce Richardson <bruce.richardson@intel.com>
Wed, 3 Apr 2019 14:45:04 +0000 (15:45 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 4 Apr 2019 20:45:54 +0000 (22:45 +0200)
commitf9acaf84e923066344bd3467e4703da66f1f23a8
treecd3780dd1ae1739aee8930533401e58d67b3f32e
parent277b6e7ef457729b88fe415dfd4a2184e5b329fb
replace snprintf with strlcpy without adding extra include

For files that already have rte_string_fns.h included in them, we can
do a straight replacement of snprintf(..."%s",...) with strlcpy. The
changes in this patch were auto-generated via command:

spatch --sp-file devtools/cocci/strlcpy-with-header.cocci --dir . --in-place

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
47 files changed:
app/pdump/main.c
app/proc-info/main.c
app/test-bbdev/main.c
app/test/test_cmdline_etheraddr.c
app/test/test_cmdline_num.c
app/test/test_compressdev.c
app/test/test_eal_flags.c
drivers/bus/pci/bsd/pci.c
drivers/bus/vdev/vdev.c
drivers/net/bonding/rte_eth_bond_pmd.c
drivers/net/dpaa2/dpaa2_ethdev.c
drivers/net/failsafe/failsafe_args.c
drivers/net/i40e/i40e_ethdev.c
drivers/net/pcap/rte_eth_pcap.c
drivers/net/ring/rte_eth_ring.c
drivers/net/softnic/rte_eth_softnic_tap.c
drivers/net/tap/rte_eth_tap.c
examples/cmdline/commands.c
examples/cmdline/parse_obj_list.c
examples/exception_path/main.c
examples/ip_pipeline/kni.c
examples/ip_pipeline/tap.c
examples/l3fwd-power/main.c
examples/multi_process/simple_mp/mp_commands.c
examples/netmap_compat/bridge/bridge.c
examples/netmap_compat/lib/compat_netmap.c
examples/tep_termination/main.c
examples/vhost/main.c
examples/vhost_scsi/scsi.c
lib/librte_cmdline/cmdline.c
lib/librte_cmdline/cmdline_parse.c
lib/librte_cmdline/cmdline_parse_num.c
lib/librte_cryptodev/rte_cryptodev.c
lib/librte_distributor/rte_distributor.c
lib/librte_distributor/rte_distributor_v20.c
lib/librte_eal/common/eal_common_memzone.c
lib/librte_eal/common/eal_common_tailqs.c
lib/librte_ethdev/rte_ethdev.c
lib/librte_hash/rte_cuckoo_hash.c
lib/librte_hash/rte_fbk_hash.c
lib/librte_kni/rte_kni.c
lib/librte_lpm/rte_lpm.c
lib/librte_lpm/rte_lpm6.c
lib/librte_mempool/rte_mempool.c
lib/librte_pdump/rte_pdump.c
lib/librte_pipeline/rte_pipeline.c
lib/librte_ring/rte_ring.c