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 E96F5A0032; Sat, 2 Oct 2021 18:24:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF0C6411FE; Sat, 2 Oct 2021 18:24:56 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 7ABBC411A0 for ; Sat, 2 Oct 2021 18:24:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633191894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MFH/u1/CHrquhCu22gaVAhIPRdqurtYPYxvQ1rXGr6w=; b=YcFKB+g4K+v6w63bIIaY4CkyHm+auFGF69vftcvyWhCOT7VSI65EEK5iKUuBEdsYMAes9S 8qrgs3gF+L1byqJduLYReSwfod27KNb+h95w2Sr5qUVTUGyvbVOuDMc4zkQ3hVcrEDeRlP 3eVgd00fdgf7Tu0qNGZrYCkas0WK87A= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-47-EDKrR1X_PgaL4WEqc27-pA-1; Sat, 02 Oct 2021 12:24:53 -0400 X-MC-Unique: EDKrR1X_PgaL4WEqc27-pA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C30801927802; Sat, 2 Oct 2021 16:24:51 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.194.246]) by smtp.corp.redhat.com (Postfix) with ESMTP id 99D235C1D0; Sat, 2 Oct 2021 16:24:49 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: aconole@redhat.com, zhihongx.peng@intel.com, stable@dpdk.org, Reshma Pattan , Naga Suresh Somarowthu Date: Sat, 2 Oct 2021 18:24:31 +0200 Message-Id: <20211002162432.4348-3-david.marchand@redhat.com> In-Reply-To: <20211002162432.4348-1-david.marchand@redhat.com> References: <20210917082313.21934-1-david.marchand@redhat.com> <20211002162432.4348-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Subject: [dpdk-dev] [PATCH v2 2/3] test/latencystats: fix incorrect loop boundary 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 Sender: "dev" Caught running ASAN. lat_stats_strings[] is an array containing NUM_STATS strings. Fixes: 1e3676a06e4c ("test/latency: add unit tests for latencystats library") Cc: stable@dpdk.org Signed-off-by: David Marchand Acked-by: Reshma Pattan --- app/test/test_latencystats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test_latencystats.c b/app/test/test_latencystats.c index 427339904d..724acbc315 100644 --- a/app/test/test_latencystats.c +++ b/app/test/test_latencystats.c @@ -80,7 +80,7 @@ static int test_latencystats_get_names(void) /* Success Test: Valid names and size */ size = NUM_STATS; ret = rte_latencystats_get_names(names, size); - for (i = 0; i <= NUM_STATS; i++) { + for (i = 0; i < NUM_STATS; i++) { if (strcmp(lat_stats_strings[i].name, names[i].name) == 0) printf(" %s\n", names[i].name); else -- 2.23.0