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 B867342C04; Thu, 1 Jun 2023 17:03:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9228B42DA9; Thu, 1 Jun 2023 17:01:32 +0200 (CEST) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mails.dpdk.org (Postfix) with ESMTP id 8846B42D82 for ; Thu, 1 Jun 2023 17:01:29 +0200 (CEST) Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1b010338d82so4439325ad.0 for ; Thu, 01 Jun 2023 08:01:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1685631688; x=1688223688; 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=j0likHfQdZETDBZU4vhlch6000df6BW+7SOm4sIHWFI=; b=wN2rf+geLDORiMk53xrq1y1e7hgftOS6iDQTIUfHTWXzW44sTMCOae2Q9QmfBK+moc FLgEnNLHxGIybmZFTQcqrpgwJVH03Nruvd5eM6D15HpYS25np79fMJLeZHaZ4fXqWxBJ rOZirtk1+XlSAv5S2c8y2z9kehLRwWT1hkemUkoWVh4gsWqDx2vSKSrGSH6t8Sv8AYBB aPFv86a6/PIdY09yoZfxabclb+brOoAR55uuaLUV94oiNh9fovKJaxk2ILPl5LN9D3dp /LmhhYN6oqfLx+L6AY44A0dlVcd74uQHjPe/RWSVVb/nJfqubc1NHQgYy9jHvtYGvjz1 5nrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685631688; x=1688223688; 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=j0likHfQdZETDBZU4vhlch6000df6BW+7SOm4sIHWFI=; b=OGxG8Fk0xFRB0lRc+1L1YL5g9ZzDHBQGbg9ZPff8j+FWDTIR7QuPg5qA0SjRzuTguK gxCk71rw1HtqjU/2yl8ExLg13UagvuFg3UVvrCBanYXaH/z6bLN2VSdhMJk0wPhpXQQ3 WX9iX4O7jkNVXkiMjBRFbQgLVbFM9lAwmRAbAAHcHKWrQ6MW+MsY2lVRTIqWXIlt6Q4k qhhG80E14RGGWKgfIaSagvbJk2PUhc6MlsUasUe8iuZwatlTntFKObRJgH7eL636FSvt Y5VbVj2KfmMLrT+518BWFl9cekoOa6TW+6jXc2YRtld8VvrsHA6M2w43HaNO9G3x1dXk o8FQ== X-Gm-Message-State: AC+VfDyqTfFICZyRym3hv8N207Ye92wXNJnIVsM/DH4AI+mswI15v5wT RcyRVCAetCLYbQ7SLkHy3TFzvKoOFEDelAUGajO2rA== X-Google-Smtp-Source: ACHHUZ5MTJbirz2iPvGT7jIrd1QhkIuyaJmC83S7xdX/7e2JtxXuX1CCwqQf1KUhPXCHm80HzZxNhg== X-Received: by 2002:a17:902:d4d1:b0:1b1:8471:341 with SMTP id o17-20020a170902d4d100b001b184710341mr2433796plg.21.1685631688561; Thu, 01 Jun 2023 08:01:28 -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.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 08:01:28 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Yuying Zhang , Beilei Xing Subject: [PATCH 14/25] net/cpfl: replace snprintf with strlcpy Date: Thu, 1 Jun 2023 08:00:55 -0700 Message-Id: <20230601150106.18375-15-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/cpfl/cpfl_ethdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c index ede730fd508b..7aed8c878ee6 100644 --- a/drivers/net/cpfl/cpfl_ethdev.c +++ b/drivers/net/cpfl/cpfl_ethdev.c @@ -380,9 +380,9 @@ static int cpfl_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev, if (xstats_names) { for (i = 0; i < CPFL_NB_XSTATS; i++) { - snprintf(xstats_names[i].name, - sizeof(xstats_names[i].name), - "%s", rte_cpfl_stats_strings[i].name); + strlcpy(xstats_names[i].name, + rte_cpfl_stats_strings[i].name, + sizeof(xstats_names[i].name)); } } return CPFL_NB_XSTATS; -- 2.39.2