patches for DPDK stable branches
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: aconole@redhat.com, zhihongx.peng@intel.com, stable@dpdk.org,
	Reshma Pattan <reshma.pattan@intel.com>,
	Naga Suresh Somarowthu <naga.sureshx.somarowthu@intel.com>
Subject: [dpdk-stable] [PATCH 2/3] test/latencystats: fix incorrect loop boundary
Date: Fri, 17 Sep 2021 10:23:12 +0200	[thread overview]
Message-ID: <20210917082313.21934-3-david.marchand@redhat.com> (raw)
In-Reply-To: <20210917082313.21934-1-david.marchand@redhat.com>

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 <david.marchand@redhat.com>
---
 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


  parent reply	other threads:[~2021-09-17  8:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210917082313.21934-1-david.marchand@redhat.com>
2021-09-17  8:23 ` [dpdk-stable] [PATCH 1/3] bus/vmbus: fix leak on device scan David Marchand
2021-09-29 20:57   ` Long Li
2021-09-30  7:50     ` David Marchand
2021-09-30 19:14       ` Long Li
2021-10-01  6:47         ` David Marchand
2021-10-01 16:28           ` Long Li
2021-09-17  8:23 ` David Marchand [this message]
2021-09-20  8:51   ` [dpdk-stable] [PATCH 2/3] test/latencystats: fix incorrect loop boundary Pattan, Reshma
     [not found] ` <20211002162432.4348-1-david.marchand@redhat.com>
2021-10-02 16:24   ` [dpdk-stable] [PATCH v2 1/3] bus/vmbus: fix leak on device scan David Marchand
2021-10-04 17:43     ` Long Li
2021-10-02 16:24   ` [dpdk-stable] [PATCH v2 2/3] test/latencystats: fix incorrect loop boundary David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210917082313.21934-3-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=aconole@redhat.com \
    --cc=dev@dpdk.org \
    --cc=naga.sureshx.somarowthu@intel.com \
    --cc=reshma.pattan@intel.com \
    --cc=stable@dpdk.org \
    --cc=zhihongx.peng@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).