[Rpm-maint] [rpm-software-management/rpm] Add rpmlogOnce() and rpmlogReset() (PR #3417)
Panu Matilainen
notifications at github.com
Thu Oct 31 08:18:01 UTC 2024
@pmatilai commented on this pull request.
> + }
+ va_end(ap);
+ }
+ errno = saved_errno;
+ return newkey;
+}
+
+void rpmlogReset(uint64_t domain, int mode=0)
+{
+ rpmlogCtx ctx = rpmlogCtxAcquire();
+ std::map<std::pair<int, std::string>, int> domain_data = {};
+
+ if (ctx) {
+ wrlock lock(ctx->mutex);
+ if (mode)
+ domain_data = ctx->seen[domain];
Don't add speculative dead code, this only looks baffling. Add handling for other modes when you add them.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3417#pullrequestreview-2407327566
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3417/review/2407327566 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20241031/5b174ba8/attachment.html>
More information about the Rpm-maint
mailing list