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 2625D42BF2; Thu, 1 Jun 2023 17:03:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2499642D49; Thu, 1 Jun 2023 17:01:29 +0200 (CEST) Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by mails.dpdk.org (Postfix) with ESMTP id C8F7A42D65 for ; Thu, 1 Jun 2023 17:01:26 +0200 (CEST) Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-530638a60e1so847629a12.2 for ; Thu, 01 Jun 2023 08:01:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1685631686; x=1688223686; 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=lhQ7hXCbL8jCGpF+RrVr6hnCz9fEMJp3NEzoyaOB8lU=; b=jLgois0u+C8jx134hbExId3TG1z3/oEUR/ZAA9QqPvrglgNJ8ryCoD5zWH2JRPvOEg CIT5gIqUgQhWGetp600K7NmQ72gX41nnsjSrqz69bYEl0CDaYKplcx696KTKwZiDpTMv WzF6wkjp4R1WcyaRTy3yau6Q1UrMk5fJOosHUtsp1prR1zr+mk+3fPLNDzegyj4UMV3g 3q7R5Y3JJONM4UTuwG4vjiywSdh8w5HwkSBKOM3YpjMJtyDRUJ7CbfjGOVd/76rLgKIh +YSwu4GXEsuNZsFBESlolaZ5qNrhhuYyqxB4rNPK6+SQtb9wA4jS46CrUD1nf41LJWYR z11A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685631686; x=1688223686; 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=lhQ7hXCbL8jCGpF+RrVr6hnCz9fEMJp3NEzoyaOB8lU=; b=ISycvnjRJ533RlG6liGbFabdRlglIGwVZs2rh36JtMD3ZIefyvh8QA83TSv/t7kv3J aDkoX2hyeGRFFce3a5kcbk2HGu1nle4GZ5+JlwPlnIgEqynsp9Q0XUUcaVMylP23QxAg EzZ43UavdDKKSYXAhwYKjCVLaT3ncyr2y8I1Kom7ZUYnTPG2fZxt69Hus1iFnG0X+a4p PD6l+HMZi6mAXRO0rRYHv5Y5Yyh7px2wBBzs5sTQUNR//NoHqtTLjv4QCdea9xQFUd+Z CL0al9XoLlli820wxnNoQpKSoDGp5wo3wTmZNacM2LqFtt24FkcjdRid454omyXnoJDT oYYg== X-Gm-Message-State: AC+VfDyxT1YjRA2URGdw7aq7nezR8JGLGF6MZW+cuthU33JOucM3VjIT w2kcXhbEZYtatSUWrhVngF9l5GjKVgI4XKOYwIr6JQ== X-Google-Smtp-Source: ACHHUZ7jFTY17+58tEZZjgQkQ8LyNMVnEJ2N61BuVVStxywDCZlHleRS2jcFpKHpN3o+oB6u3DKuig== X-Received: by 2002:a17:902:c38d:b0:1af:d750:10cb with SMTP id g13-20020a170902c38d00b001afd75010cbmr9003243plg.63.1685631685803; Thu, 01 Jun 2023 08:01:25 -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.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 08:01:25 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Igor Russkikh Subject: [PATCH 11/25] net/atlantic: replace snprintf with strlcpy Date: Thu, 1 Jun 2023 08:00:52 -0700 Message-Id: <20230601150106.18375-12-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/atlantic/atl_ethdev.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c index 3a028f429002..09a7d9c8c88f 100644 --- a/drivers/net/atlantic/atl_ethdev.c +++ b/drivers/net/atlantic/atl_ethdev.c @@ -1006,9 +1006,8 @@ atl_dev_xstats_get_names(struct rte_eth_dev *dev __rte_unused, if (xstats_names) { for (i = 0; i < size && i < count; i++) { - snprintf(xstats_names[i].name, - RTE_ETH_XSTATS_NAME_SIZE, "%s", - atl_xstats_tbl[i].name); + strlcpy(xstats_names[i].name, atl_xstats_tbl[i].name, + RTE_ETH_XSTATS_NAME_SIZE); } } -- 2.39.2