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 1427C42C04; Thu, 1 Jun 2023 17:02:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 319E842D51; Thu, 1 Jun 2023 17:01:21 +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 AC18842D46 for ; Thu, 1 Jun 2023 17:01:19 +0200 (CEST) Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1b01dac1a82so4723995ad.2 for ; Thu, 01 Jun 2023 08:01:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1685631678; x=1688223678; 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=HZARbk9YgVRO2lX5CYMPQBUD+qzvDSA0DNrTV3EpARg=; b=bvqroIgPZeaWVj0yqcYnl6CroLF6B1IQa6VPkuzTY72hGW3ZoWzhGW967LUM9F8JJ4 rTD6TqlHmYwiH5riV472AOrcAhJr9dAtyjVatOFzeqkHHDo10GpwTfbxf5T12cdh42J9 Kpg/UYqleR2ua/BKFpLkx5oq2VFn28RIY+ZbSyIfVDW1mLjKQDPyqAGMkHE/F1DnoQTE ZB4pMx87rrkI2icZ3dNc+5oguB8NUoFLtlXfm37q/P2r0RH/cxKAsCgYkRRnwmYmN7/d 53+HFBUXD40iaEfmosj4asPV1UmGeQXuZs+J7FjxGr5RhMtttQNTx1b9PYLITqEDkD8F tJfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685631678; x=1688223678; 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=HZARbk9YgVRO2lX5CYMPQBUD+qzvDSA0DNrTV3EpARg=; b=dcZHGLS5jTU8gqhw3b2cSzorcEdre4g2+Iq/xHnlm8ASZrRF9rAHuqh5dGraZT5tPV YXziFkJLf9hetwhyJoGdKGWoQRgE8x8Dl+kEc1AMVr+LTG+rsI56JZkBJPKaIdU8SSLi cmCGOl8WAxvZVFn703iEP2uhvG6Kkd16VLyr5p2YhkH7YCfwUVI9pIhnduxqY1/UDUY9 D2xQspu9AwQAPyY4wApu54n5VpvWM2odjrIqiiOtg/Rq9ycCiOV3N7niTLohc7gvAqq/ w6BleMLyuQsK2j8a2GsJ/dOveorS2qQemaCxfx2SZ4a3odKWILsRvOp2e84bBPuyokWn WJVQ== X-Gm-Message-State: AC+VfDzpFjKWOe9TUdeqwwLPzbuqovNRN16xFL028cg/pw7nH94kBAQd AJVCYFR/hXtFJrQ5SEy04PHS4hBZEbWumYN0WXHdvQ== X-Google-Smtp-Source: ACHHUZ5AsCnf5r2Di6paq/15iuDMqQ7v01ghv6+voKP2ySHtKt6LUOwLgS87QN2qRyL7T8R3dR37mA== X-Received: by 2002:a17:902:e844:b0:1b0:36b5:dd6c with SMTP id t4-20020a170902e84400b001b036b5dd6cmr7088448plg.26.1685631678258; Thu, 01 Jun 2023 08:01:18 -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.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 08:01:17 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao Subject: [PATCH 05/25] common/cnxk: replace snprint with strlcpy Date: Thu, 1 Jun 2023 08:00:46 -0700 Message-Id: <20230601150106.18375-6-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/common/cnxk/roc_nix_stats.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/common/cnxk/roc_nix_stats.c b/drivers/common/cnxk/roc_nix_stats.c index 6b5803af8442..b2e1c8cd05ad 100644 --- a/drivers/common/cnxk/roc_nix_stats.c +++ b/drivers/common/cnxk/roc_nix_stats.c @@ -16,9 +16,7 @@ #define NIX_XSTATS_NAME_PRINT(xstats_names, count, xstats, index) \ do { \ if (xstats_names) \ - snprintf(xstats_names[count].name, \ - sizeof(xstats_names[count].name), "%s", \ - xstats[index].name); \ + strlcpy(xstats_names[count].name, xstats[index].name, sizeof(xstats_names[count].name)); \ } while (0) int -- 2.39.2