From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 19E3C42C04; Thu, 1 Jun 2023 17:01:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B182942C4D; Thu, 1 Jun 2023 17:01:12 +0200 (CEST) Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by mails.dpdk.org (Postfix) with ESMTP id 650CD42D10 for ; Thu, 1 Jun 2023 17:01:11 +0200 (CEST) Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-53f832298acso498559a12.0 for ; Thu, 01 Jun 2023 08:01:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1685631670; x=1688223670; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Td9KPUOZ/pYeGN6e3lfMzC1nRKbKipNYx51OQmyrLJI=; b=ZxG8ev/9ekYFxvYVO88M33t2IX90bShhlDiKaAlF9OkExWwoVQgitgmzzvNgCcxkoY mETDVkHgBvoQmCiUf6Py5J8W4MVDXSB6NMah9WJc43geZOGE/7GOQR4dApyEbneFf5E+ ShnZxtolc/D7b/Kq98nINIJoL0DZKWf5XVrQbnRTcT/W0MIlDSG5rUUx6Uzff8LQjQbN pFu9ucihOcWz0HlHwIoB97zZ5jCfo2oYQsBkXnM2XhH6XM6xvU0WAbMa0Wm5rcRHsywg m/TvD99XSs8hJOmNeZr7LDoEjplwcViLyVJ0fqmXH8aOpi4V0wj1cncKmCZLGt2yj2lS 1esQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685631670; x=1688223670; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Td9KPUOZ/pYeGN6e3lfMzC1nRKbKipNYx51OQmyrLJI=; b=eSsLzg2dJpIgoAJGWiEyJbY9Vhw5hfWkopydB0vDqUNi+1WBCvOAyT1iEMw+xhP6wE ECLeRHEUItSZXheQ+ZzfTU2RNsAC7mN2+995lYeyYOUDaiBFR4qlpxbLrCEIgr5iGYJr 9xTo5e7vu58K7nDvZgyWZmR6N5Fuzt6vxLLj8sIXO6upGNV80PPJoz4OQNy3M1fTQ3a0 +beNjdbgIAo/QkWVWTsjTvCwduz07xhzl3GKuMDoCkVi/nEi9Ugf8wuS26GTZ+DHLn2M chnLnkcM4O78JByIwLEtw3K3GYojegUDCTtcOsqzJnqswNWlCxscFi+MITe2UWb7UrG/ OawA== X-Gm-Message-State: AC+VfDwzVUwaCR4KioTWwlxP2noRDZeNY34TmPC9Wl30+Bo3aTpBi+xp 3EzcduSmDOD3LLdujcE7hRfizp395YTTD3NMOuYoXw== X-Google-Smtp-Source: ACHHUZ7pyNPYSwhtuEEVEVU3DXMGXMYhxvUzXcLFe6/w/kG3xO2dKmhybqBm0KMGc3M0TDbjxKqWfw== X-Received: by 2002:a17:902:b215:b0:1ae:626b:475f with SMTP id t21-20020a170902b21500b001ae626b475fmr5233142plr.12.1685631670122; Thu, 01 Jun 2023 08:01:10 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id ij9-20020a170902ab4900b001ac40488620sm3661955plb.92.2023.06.01.08.01.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 08:01:09 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH 00/25] replace snprintf with strlcpy Date: Thu, 1 Jun 2023 08:00:41 -0700 Message-Id: <20230601150106.18375-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This patch series was generated by using the existing Coccinelle script to find where snprintf() is used but strlcpy() could be used instead. Manually replaced fixed some trigraphs and paren's where needed. Also one instance the whole temporary string copy was not needed at all. Stephen Hemminger (25): app: use strlcpy in tests examples: use strlcpy instead of snprintf lib: use strlcpy instead of snprintf raw/ifpga: replace snprintf with strlcpy common/cnxk: replace snprint with strlcpy common/mlx5: replace snprintf with strlcpy drivers/gpu: replace snprintf with strlcpy crypto/ipsec_mb: remove unnecessary snprintf crypto/dpaa_sec: replace snprintf with strlcpy event/cnxk: replace snprintf with strlcpy net/atlantic: replace snprintf with strlcpy net/axgbe: replace snprintf with strlcpy net/bnxt: replace snprintf with strlcpy net/cpfl: replace snprintf with strlcpy net/cxgbe: replace snprintf with strlcpy net/dpaa*: replace snprintf with strlcpy net/hinic: replace snptintf with strlcpy net/hns3: replace snprint with strlcpy net/intel: replace snprintf with strlcpy net/ionic: replace snprintf with strlcpy net/mlx5: replace snprintf with strlcpy net/nfp: replace snprintf with strlcpy net/ngbe: replace snprintf with strlcpy net/qede: replace snprintf with strlcpy net/txgbe: replace snprintf with strlcpy app/test-bbdev/main.c | 5 ++-- app/test-pmd/cmdline_flow.c | 6 ++-- app/test/process.h | 2 +- app/test/test_graph_perf.c | 29 ++++++++++--------- drivers/common/cnxk/roc_nix_stats.c | 4 +-- drivers/common/mlx5/linux/mlx5_common_os.c | 2 +- drivers/common/mlx5/mlx5_common_utils.c | 5 ++-- drivers/crypto/dpaa_sec/dpaa_sec.c | 2 +- drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 7 +---- drivers/event/cnxk/cnxk_eventdev_stats.c | 11 ++++--- drivers/gpu/cuda/cuda.c | 2 +- drivers/gpu/cuda/gdrcopy.c | 2 +- drivers/net/atlantic/atl_ethdev.c | 5 ++-- drivers/net/axgbe/axgbe_ethdev.c | 6 ++-- drivers/net/bnxt/bnxt_ethdev.c | 8 ++--- drivers/net/cpfl/cpfl_ethdev.c | 6 ++-- drivers/net/cxgbe/cxgbe_ethdev.c | 9 +++--- drivers/net/dpaa/dpaa_ethdev.c | 8 ++--- drivers/net/dpaa2/dpaa2_ethdev.c | 8 ++--- drivers/net/fm10k/fm10k_ethdev.c | 6 ++-- drivers/net/hinic/base/hinic_compat.h | 1 + drivers/net/hinic/base/hinic_pmd_niccfg.c | 4 +-- drivers/net/hinic/hinic_pmd_ethdev.c | 14 ++++----- drivers/net/hns3/hns3_fdir.c | 2 +- drivers/net/hns3/hns3_rxtx.c | 8 ++--- drivers/net/hns3/hns3_stats.c | 22 +++++++------- drivers/net/i40e/i40e_rxtx.c | 8 ++--- drivers/net/iavf/iavf_ethdev.c | 6 ++-- drivers/net/ice/ice_dcf_ethdev.c | 6 ++-- drivers/net/ice/ice_rxtx.c | 8 ++--- drivers/net/idpf/idpf_ethdev.c | 6 ++-- drivers/net/ionic/ionic_ethdev.c | 15 +++++----- drivers/net/ipn3ke/ipn3ke_representor.c | 17 +++++------ drivers/net/mlx5/mlx5_rx.c | 16 +++++----- .../net/nfp/flower/nfp_flower_representor.c | 4 +-- drivers/net/ngbe/ngbe_rxtx.c | 8 ++--- drivers/net/qede/qede_ethdev.c | 10 +++---- drivers/net/txgbe/txgbe_ethdev_vf.c | 6 ++-- drivers/raw/ifpga/afu_pmd_core.c | 3 +- examples/fips_validation/fips_validation.c | 8 ++--- examples/l3fwd-graph/main.c | 2 +- examples/pipeline/cli.c | 2 +- examples/vhost_blk/vhost_blk.c | 5 ++-- lib/bbdev/rte_bbdev.c | 2 +- lib/ethdev/sff_8636.c | 11 ++++--- 45 files changed, 157 insertions(+), 170 deletions(-) -- 2.39.2