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 E17F142C04; Thu, 1 Jun 2023 17:03:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A93C42D94; Thu, 1 Jun 2023 17:01:30 +0200 (CEST) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mails.dpdk.org (Postfix) with ESMTP id 77AAE42D70 for ; Thu, 1 Jun 2023 17:01:27 +0200 (CEST) Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1b041cceb16so8050815ad.2 for ; Thu, 01 Jun 2023 08:01:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1685631687; x=1688223687; 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=jDXI9oQoR7EXpy9FklUrCQ6X6QowaT/dPrOxnWyyFrM=; b=jqrT2bRXcjLIYywChoy6H4UTOBdT7vIl1eCiVFbu4RE2SJlUjAf83KuvDpYMIhOF2O uRRg+34bLBhpMTnspWdt0pUYEJPiUFdZJ09Sg5RPVLBDB1oFAINVb6JJODJt4u0LXXqh k1GZDAx9JD5cRl0nCG7TOIAawW5ECdHsw4LHh8CiWWXl//bKLwWw+A/BYqRauOBrqGh6 jRTpeOMFnDMWALeSqP1xHrdB/AzeIs9swktyxzydZhwAf/tgGU/A4hUYkHroK1MdnMuM CwYzXKwdAOriDDOKLJYKzm9VxHnAWb1I78yDvFdtAq3RZ0U+Dz+5cNuKFiX3y95yHO/u NXPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685631687; x=1688223687; 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=jDXI9oQoR7EXpy9FklUrCQ6X6QowaT/dPrOxnWyyFrM=; b=lNRwFTAotJrKv9zZE3fQm9C/fbsYQvSo0DLxPmo64dT20NbIF3DEZxEbKBqE9BqmzK kyVBqf8InpUXbfZA71wERmHAFm/nGoqas589z4PNRGkcc3DW+Pq6RQixXsnAQh1WMc0R lV1havn9c/61kMJ6rkfvkWHbu9CNOLeXjFpQ5rwbXwWV6DMU20L1TfP8gxu3SYSio/u7 A894CPisG5o7NBtEg9eMhH/vul+NIHgSrf82FH1OOsjzn0FZCVnVCBLdC5wTw8YvhyJZ sDbx8eAw90wjCP50t5W+G2aEDSVhfcK2uVnN5gIoIGDRZgyVRySWDRdmouAglmtk13Wy OzlA== X-Gm-Message-State: AC+VfDyODTQl7graGecNHR/7mtgiMIeKnX5WMifFHJXfuSi24WLrC3kf bpr0C8LF9XHLv4LmzgMft779RFKs2PHa9FP2ojojYQ== X-Google-Smtp-Source: ACHHUZ4I26Qj5v6WRF8psPduHbiX9GIH7HaEP8EFwjuMJJiVSlur5827fEigk1mM4jFiSWI/QwSCtQ== X-Received: by 2002:a17:903:120f:b0:1af:cbb1:845 with SMTP id l15-20020a170903120f00b001afcbb10845mr9783792plh.16.1685631686716; Thu, 01 Jun 2023 08:01:26 -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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 08:01:26 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Chandubabu Namburu Subject: [PATCH 12/25] net/axgbe: replace snprintf with strlcpy Date: Thu, 1 Jun 2023 08:00:53 -0700 Message-Id: <20230601150106.18375-13-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/axgbe/axgbe_ethdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c index 48714eebe699..f28d18ec9035 100644 --- a/drivers/net/axgbe/axgbe_ethdev.c +++ b/drivers/net/axgbe/axgbe_ethdev.c @@ -1025,9 +1025,9 @@ axgbe_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev, if (n >= AXGBE_XSTATS_COUNT && xstats_names) { for (i = 0; i < AXGBE_XSTATS_COUNT; ++i) { - snprintf(xstats_names[i].name, - RTE_ETH_XSTATS_NAME_SIZE, "%s", - axgbe_xstats_strings[i].name); + strlcpy(xstats_names[i].name, + axgbe_xstats_strings[i].name, + RTE_ETH_XSTATS_NAME_SIZE); } } -- 2.39.2