Hi, Luis
Thank you for the patch. Ack.
Lianbo
On 12/23/25 9:45 AM, devel-request(a)lists.crash-utility.osci.io wrote:
Date: Wed, 17 Dec 2025 08:13:50 -0000
From: "Luis Galdos"<luis.galdos(a)suse.com>
Subject: [Crash-utility] [PATCH] bpf: improve for-loop when searching
for used_maps
To:devel@lists.crash-utility.osci.io
Message-ID:<20251217081350.9702.15487@lists.crash-utility.osci.io>
Content-Type: text/plain; charset="utf-8"
As the list bpf->maplist contains unique pointers, break when a
map is found.
Signed-off-by: Luis Galdos<luis.galdos(a)suse.com>
---
bpf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/bpf.c b/bpf.c
index 9b99e23..2840c7d 100644
--- a/bpf.c
+++ b/bpf.c
@@ -880,6 +880,7 @@ bpf_prog_used_maps(int idx, char *retbuf)
sprintf(&retbuf[strlen(retbuf)], "%s%ld",
strlen(retbuf) ? "," : "",
bpf->maplist[m].index);
+ break;
}
}
}
-- 2.52.0