[Rpm-maint] [rpm-software-management/rpm] Convert variable length arrays to C++ strings and vectors (PR #4113)

Panu Matilainen notifications at github.com
Wed Feb 25 07:16:48 UTC 2026


@pmatilai commented on this pull request.



>  
 	/* Parse for "tag=pattern" args. */
-	if ((ae = strchr(a, '=')) != NULL) {
-	    *ae++ = '\0';
-	    tag = rpmTagGetValue(a);
+	size_t sep = pat.find_first_of('=');
+	if (sep != pat.npos) {
+	    auto tagname = pat.substr(0, sep);

Oh. Hmm. We have some tests for the underlying functionality in rpmdb (mi.pattern() stuff in rpmpython.at) but this cli-stuff has its own code. Good spotting, I'll add a test or two while we're here.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/4113#discussion_r2851294311
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/4113/review/3852356761 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20260224/5ceb06fe/attachment.htm>


More information about the Rpm-maint mailing list