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 0DFE742C04; Thu, 1 Jun 2023 17:06:02 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 935F942FCA; Thu, 1 Jun 2023 17:01:44 +0200 (CEST) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mails.dpdk.org (Postfix) with ESMTP id 7528D42FBA for ; Thu, 1 Jun 2023 17:01:41 +0200 (CEST) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-64d41763796so643175b3a.2 for ; Thu, 01 Jun 2023 08:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1685631700; x=1688223700; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6uSBtC1PErz5EsP8GeqIk33zyQMLE9A/pyqMuv0s6sM=; b=3KS8vtE9ln67tSzEt2yXk/hUDmwxM9JAHhdProUMfKz1jRzw4gCuVXrDtbfxnHwr2n qd8nP0oyyaSdhal9sv9xK4Q4OP66jEn5M33lxkG98zNGkiWv6v62qdT/Fb1vA8UMWadn LUQE5Ojr5AIIqHmcxEaJ8rD0dsacO3ZKleoMa07zRISZEAp6/URQ+UEleVC9WESPHpNO AtR3OXZuq+d6mGy/np1F6rdpKAJdja3sGRdrcCk3gz4x5g6detPcEQltAEe3dYU5R3zW +n+7H2p1PKiJyMIqzSfTfO37zVh7/zWPYg9/aJIkZaYnuB/m/yxnGKpd1p3DLnuXqwyo DhLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685631700; x=1688223700; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6uSBtC1PErz5EsP8GeqIk33zyQMLE9A/pyqMuv0s6sM=; b=CIJfN1MeGUOAKaZxmZ5zMlAGSmRHzl4KtCHnPFFom7okM7tgQXlPzehIFOdCnZ6lCc IqlsL8yVCE9jeJnKLymRXlUDvhGwEqyCvmNmJGzLHHKRQE3NEKJXEeNrcCY/oMHpxmOD alElMv54pxepwb8UzLRSd3wgNZSfVHNDjqR7XxWJPHP2pC4SmghdiGGlcC9z7ZdC8njZ ORb7dnlHgoKgI9LUy+WDrfbSnvdfakDEKFU0TuoBPdJh02mX4N7Y8eiYDsBz/fw2xBgF ePB3pH7Xe0rPwwyUXliu98jkGkWfpsU8qJjvn3WV0KRhRHYlmkfMIrvKNi0airMqJR42 rV/A== X-Gm-Message-State: AC+VfDxud3T0AXQZrEt/xZyT1Z2rxNGB0XEGQ4dNOZfYNA6Ahe8rZ/60 RurDi6RqBpL7j1+eHTIbO4LaB6VSsPlym9Rw6VY2nA== X-Google-Smtp-Source: ACHHUZ49vW6yPbB7Gh4GwX72q5ii/XfoaX2lB07tpchKTQ4KhhRMVciml5i5TyCjo/e84PcW5kzYYA== X-Received: by 2002:a05:6a20:c90b:b0:10b:cb87:f5e with SMTP id gx11-20020a056a20c90b00b0010bcb870f5emr6468478pzb.45.1685631700432; Thu, 01 Jun 2023 08:01:40 -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.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 08:01:40 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jiawen Wu , Jian Wang Subject: [PATCH 25/25] net/txgbe: replace snprintf with strlcpy Date: Thu, 1 Jun 2023 08:01:06 -0700 Message-Id: <20230601150106.18375-26-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230601150106.18375-1-stephen@networkplumber.org> References: <20230601150106.18375-1-stephen@networkplumber.org> 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 Suggested by devtools/cocci/strlcpy-with-header.cocci Signed-off-by: Stephen Hemminger --- drivers/net/txgbe/txgbe_ethdev_vf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/txgbe/txgbe_ethdev_vf.c b/drivers/net/txgbe/txgbe_ethdev_vf.c index 3b1f7c913b7b..376357a23648 100644 --- a/drivers/net/txgbe/txgbe_ethdev_vf.c +++ b/drivers/net/txgbe/txgbe_ethdev_vf.c @@ -357,9 +357,9 @@ static int txgbevf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev, if (xstats_names != NULL) for (i = 0; i < TXGBEVF_NB_XSTATS; i++) - snprintf(xstats_names[i].name, - sizeof(xstats_names[i].name), - "%s", rte_txgbevf_stats_strings[i].name); + strlcpy(xstats_names[i].name, + rte_txgbevf_stats_strings[i].name, + sizeof(xstats_names[i].name)); return TXGBEVF_NB_XSTATS; } -- 2.39.2