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 1612443E83; Tue, 16 Apr 2024 17:21:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B240440685; Tue, 16 Apr 2024 17:21:34 +0200 (CEST) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id 460A0402B5 for ; Tue, 16 Apr 2024 17:21:31 +0200 (CEST) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1e4266673bbso39309775ad.2 for ; Tue, 16 Apr 2024 08:21:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1713280890; x=1713885690; darn=dpdk.org; 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=Nav7lAK0ucJlwAFMTsmjceBYo6WiazFyW76X9yQMvpU=; b=hxOfXWiADxS5mduRgiiX/+cgni+0cf4JMvsELUByZEm3mU6JLy7wguDuQgX1EoAu4z rnoReM2S0St7QtZRWF5Mw/E/nqyP27ZNvXWi6jAMW2Jm729BLjRjGl6evhhvnrE5Y6Pe cKuH9Xd0xOv/v8Wut7uK0+WSpoF3HaYilWxPDYyQe4MHOKlgAwRrH9Byo/4JHAnNztyK AiGQ4TMhv7uLMcgJq7CCZTivpHtesBQumyU6XTinPg8yz+3tDtMNsr++HNAU+CEjb03w 2VvKz+Eg2zBb4uPa8wX7/seNTef7cWtxEUtDPznBZY7eDV1qMoK3mLez6+RJRTAht1Gf ZgMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713280890; x=1713885690; 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=Nav7lAK0ucJlwAFMTsmjceBYo6WiazFyW76X9yQMvpU=; b=mOro/Fb8OCgAx3ymjADEK/2AOm5/CZW6MD/5f6NZ249YDSxW64wGl93fzacRSPyUiS IZhslucjfbHRZOseNS9nHUSH5aHEN/j1TBa12fVafRF9hpYAPb4iUh+u5UTg0Qxbh9YJ Qx2kGOcWIbsTTPZC1jlnIAkmHCb7dPv4tUFNeTGiMBNti7m+eP0DjhAetyShpRBJkj2g xeMwjEr7AnPJRniPggh8wuXJ2MGfjJY/jhB9+JhYmprBW0SNWoLpK424L4SwWnEH8v/u SKBwGmlWwohkTwFMOnICctnL7VezyVeCFc78Npkker5vRSyKaJAagkHOzgcan/ynGvxq 9+sw== X-Gm-Message-State: AOJu0Yw/riMjnDYlf+zja4AS2mmAYobcUn2kBdcBp91DNa+KICyOm57B QNbgDLTQkkIrBR6CN8SIkCuwQSfVpLbDLg3M5hMuxENofYX1QU6aK9HtHhBax3Okb6a4EAXYoeg f X-Google-Smtp-Source: AGHT+IHGr0QwOViUNzymIeVr3Hl4r1/9VC6CiT3NyLmJAVRlFWJlXrFvub9BRac3t5F+nh9omn5D0Q== X-Received: by 2002:a17:903:22c5:b0:1e4:55d8:e74c with SMTP id y5-20020a17090322c500b001e455d8e74cmr17111141plg.2.1713280890499; Tue, 16 Apr 2024 08:21:30 -0700 (PDT) Received: from hermes.lan (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id l17-20020a170903245100b001e80154a400sm213348pls.126.2024.04.16.08.21.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 08:21:29 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Reshma Pattan Subject: [PATCH 3/5] lib: use RTE_DIM Date: Tue, 16 Apr 2024 08:19:29 -0700 Message-ID: <20240416152124.69590-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240416152124.69590-1-stephen@networkplumber.org> References: <20240416152124.69590-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 Use RTE_DIM instead of computing directly with sizeof. Patch automatically generated via cocci/rte_dim.cocci. Signed-off-by: Stephen Hemminger --- lib/cmdline/cmdline_vt100.c | 4 +++- lib/latencystats/rte_latencystats.c | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/cmdline/cmdline_vt100.c b/lib/cmdline/cmdline_vt100.c index 4c9a46c953..61a2ecdd72 100644 --- a/lib/cmdline/cmdline_vt100.c +++ b/lib/cmdline/cmdline_vt100.c @@ -8,6 +8,8 @@ #include #include +#include + #include "cmdline_vt100.h" const char *cmdline_vt100_commands[] = { @@ -56,7 +58,7 @@ match_command(char *buf, unsigned int size) size_t cmdlen; unsigned int i = 0; - for (i=0 ; i