replace snprintf with strlcpy
authorBruce Richardson <bruce.richardson@intel.com>
Wed, 3 Apr 2019 14:45:05 +0000 (15:45 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 4 Apr 2019 20:46:05 +0000 (22:46 +0200)
commit6723c0fc7207ca4416822b170b1485a78aa47c7c
treefef3c6683019dcdf1403761e047308af49f49f8f
parentf9acaf84e923066344bd3467e4703da66f1f23a8
replace snprintf with strlcpy

Do a global replace of snprintf(..."%s",...) with strlcpy, adding in the
rte_string_fns.h header if needed.  The function changes in this patch were
auto-generated via command:

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

and then the files edited using awk to add in the missing header:

  gawk -i inplace '/include <rte_/ && ! seen { \
   print "#include <rte_string_fns.h>"; seen=1} {print}'

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
53 files changed:
app/test-acl/main.c
app/test-eventdev/evt_options.c
app/test-pmd/cmdline_flow.c
app/test/test_table_acl.c
drivers/bus/dpaa/base/fman/of.c
drivers/bus/pci/linux/pci_uio.c
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
drivers/crypto/ccp/rte_ccp_pmd.c
drivers/crypto/scheduler/rte_cryptodev_scheduler.c
drivers/event/opdl/opdl_ring.c
drivers/net/af_packet/rte_eth_af_packet.c
drivers/net/ark/ark_pktchkr.c
drivers/net/ark/ark_pktgen.c
drivers/net/atlantic/atl_ethdev.c
drivers/net/bnx2x/bnx2x_ethdev.c
drivers/net/bnxt/bnxt_stats.c
drivers/net/dpaa/dpaa_ethdev.c
drivers/net/e1000/igb_ethdev.c
drivers/net/ena/ena_ethdev.c
drivers/net/failsafe/failsafe_eal.c
drivers/net/i40e/rte_pmd_i40e.c
drivers/net/ice/ice_ethdev.c
drivers/net/ixgbe/ixgbe_ethdev.c
drivers/net/kni/rte_eth_kni.c
drivers/net/liquidio/lio_ethdev.c
drivers/net/mvneta/mvneta_ethdev.c
drivers/net/mvpp2/mrvl_ethdev.c
drivers/net/qede/qede_ethdev.c
drivers/net/virtio/virtio_user/vhost_user.c
drivers/net/virtio/virtio_user/virtio_user_dev.c
examples/ethtool/lib/rte_ethtool.c
examples/l2fwd-crypto/main.c
examples/vm_power_manager/channel_manager.c
examples/vm_power_manager/channel_monitor.c
lib/librte_acl/rte_acl.c
lib/librte_bbdev/rte_bbdev.c
lib/librte_cfgfile/rte_cfgfile.c
lib/librte_compressdev/rte_compressdev.c
lib/librte_compressdev/rte_compressdev_pmd.c
lib/librte_cryptodev/rte_cryptodev_pmd.c
lib/librte_eal/common/eal_common_options.c
lib/librte_efd/rte_efd.c
lib/librte_eventdev/rte_eventdev.c
lib/librte_flow_classify/rte_flow_classify.c
lib/librte_jobstats/rte_jobstats.c
lib/librte_latencystats/rte_latencystats.c
lib/librte_member/rte_member.c
lib/librte_mempool/rte_mempool_ops.c
lib/librte_power/power_acpi_cpufreq.c
lib/librte_power/power_pstate_cpufreq.c
lib/librte_rawdev/rte_rawdev.c
lib/librte_reorder/rte_reorder.c
lib/librte_stack/rte_stack.c